File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1981,6 +1981,17 @@ def test_no_newline(self):
19811981 safe_patterns .append (r'\x1b\[\?25[hl]' ) # cursor visibility
19821982 safe_patterns .append (r'\x1b\[\?12[hl]' ) # cursor blinking
19831983
1984+ # rmam / smam - automatic margins
1985+ rmam = ti .get ("rmam" )
1986+ smam = ti .get ("smam" )
1987+ if rmam :
1988+ safe_patterns .append (re .escape (rmam .decode ("ascii" )))
1989+ if smam :
1990+ safe_patterns .append (re .escape (smam .decode ("ascii" )))
1991+ if not rmam and not smam :
1992+ safe_patterns .append (r'\x1b\[\?7l' ) # turn off automatic margins
1993+ safe_patterns .append (r'\x1b\[\?7h' ) # turn on automatic margins
1994+
19841995 # Modern extensions not in standard terminfo - always use patterns
19851996 safe_patterns .append (r'\x1b\[\?2004[hl]' ) # bracketed paste mode
19861997 safe_patterns .append (r'\x1b\[\?12[hl]' ) # cursor blinking (may be separate)
You can’t perform that action at this time.
0 commit comments