File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1899,12 +1899,16 @@ def test_no_newline(self):
18991899 safe_patterns .append (r'\x1b\[\?25[hl]' ) # cursor visibility
19001900 safe_patterns .append (r'\x1b\[\?12[hl]' ) # cursor blinking
19011901
1902- # rmam - turn off automatic margins
1902+ # rmam / smam - automatic margins
19031903 rmam = ti .get ("rmam" )
1904+ smam = ti .get ("smam" )
19041905 if rmam :
19051906 safe_patterns .append (re .escape (rmam .decode ("ascii" )))
1906- else :
1907- safe_patterns .append (r'\x1b\[\?7l' )
1907+ if smam :
1908+ safe_patterns .append (re .escape (smam .decode ("ascii" )))
1909+ if not rmam and not smam :
1910+ safe_patterns .append (r'\x1b\[\?7l' ) # turn off automatic margins
1911+ safe_patterns .append (r'\x1b\[\?7h' ) # turn on automatic margins
19081912
19091913 # Modern extensions not in standard terminfo - always use patterns
19101914 safe_patterns .append (r'\x1b\[\?2004[hl]' ) # bracketed paste mode
You can’t perform that action at this time.
0 commit comments