mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 17:00:58 +01:00
limit the resize attempts
This commit is contained in:
parent
b5df612b4c
commit
a7f8b7a9c3
1 changed files with 6 additions and 18 deletions
|
@ -32,23 +32,8 @@ def setup_readline():
|
|||
except ValueError:
|
||||
# not all versions of readline have this symbol, ie Macs sometimes
|
||||
RL_COMPLETION_SUPPRESS_APPEND = None
|
||||
try:
|
||||
RL_CATCH_SIGNALS = ctypes.c_int.in_dll(lib, 'rl_catch_signals')
|
||||
print('RL_CATCH_SIGNALS:', RL_CATCH_SIGNALS.value)
|
||||
except ValueError:
|
||||
pass
|
||||
try:
|
||||
RL_CATCH_SIGWINCH = ctypes.c_int.in_dll(lib, 'rl_catch_sigwinch')
|
||||
print('RL_CATCH_SIGWINCH:', RL_CATCH_SIGWINCH.value)
|
||||
except ValueError:
|
||||
pass
|
||||
try:
|
||||
RL_CHANGE_ENVIRONMENT = ctypes.c_int.in_dll(lib, 'rl_change_environment')
|
||||
print('RL_CHANGE_ENVIRONMENT:', RL_CHANGE_ENVIRONMENT.value)
|
||||
except ValueError:
|
||||
pass
|
||||
lib.rl_resize_terminal()
|
||||
lib.rl_reset_screen_size()
|
||||
#lib.rl_resize_terminal()
|
||||
#lib.rl_reset_screen_size()
|
||||
# reads in history
|
||||
env = builtins.__xonsh_env__
|
||||
hf = env.get('XONSH_HISTORY_FILE', os.path.expanduser('~/.xonsh_history'))
|
||||
|
@ -189,7 +174,10 @@ class Shell(Cmd):
|
|||
@property
|
||||
def prompt(self):
|
||||
"""Obtains the current prompt string."""
|
||||
lib.rl_reset_screen_size()
|
||||
global lib
|
||||
if lib is not None:
|
||||
lib.rl_reset_screen_size()
|
||||
lib = None
|
||||
#lib.rl_resize_terminal()
|
||||
if self.need_more_lines:
|
||||
if self.mlprompt is None:
|
||||
|
|
Loading…
Add table
Reference in a new issue