Merge branch 'yskmt-post-comment-reply'
Conflicts: rtv/submission.py
This commit is contained in:
@@ -114,7 +114,7 @@ def load_config():
|
||||
|
||||
return defaults
|
||||
|
||||
def text_input(window):
|
||||
def text_input(window, show_cursor=False, insert_mode=True):
|
||||
"""
|
||||
Transform a window into a text box that will accept user input and loop
|
||||
until an escape sequence is entered.
|
||||
@@ -124,8 +124,8 @@ def text_input(window):
|
||||
"""
|
||||
|
||||
window.clear()
|
||||
curses.curs_set(2)
|
||||
textbox = textpad.Textbox(window, insert_mode=True)
|
||||
curses.curs_set(1 if show_cursor else 2)
|
||||
textbox = textpad.Textbox(window, insert_mode=insert_mode)
|
||||
|
||||
def validate(ch):
|
||||
"Filters characters for special key sequences"
|
||||
@@ -236,4 +236,4 @@ def curses_session():
|
||||
stdscr.keypad(0)
|
||||
curses.echo()
|
||||
curses.nocbreak()
|
||||
curses.endwin()
|
||||
curses.endwin()
|
||||
|
||||
Reference in New Issue
Block a user