File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,12 +132,12 @@ def main(*args):
132132 theme = get_theme ()
133133 s = theme .syntax
134134
135- if s . prompt :
136- sys . ps1 = f" \001 { s . prompt } \002 sqlite> \001 { s . reset } \002 "
137- sys . ps2 = f" \001 { s . prompt } \002 ... \001 { s . reset } \002 "
138- else :
139- sys .ps1 = f"sqlite> "
140- sys .ps2 = f" ... "
135+ # Use RL_PROMPT_START_IGNORE (\001) and RL_PROMPT_END_IGNORE (\002) to
136+ # bracket non-printing characters. This tells readline to ignore them when
137+ # calculating screen space for redisplay during history scrolling. See
138+ # https://stackoverflow.com/a/9468954 for more details.
139+ sys .ps1 = f"\001 { s . prompt } \002 sqlite> \001 { s . reset } \002 "
140+ sys .ps2 = f"\001 { s . prompt } \002 ... \001 { s . reset } \002 "
141141
142142 con = sqlite3 .connect (args .filename , isolation_level = None )
143143 try :
You can’t perform that action at this time.
0 commit comments