diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-05-27 15:08:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-27 15:08:38 +0200 |
commit | 023f67cad8d6fb3e435d0bcc815cbaec8b1692d5 (patch) | |
tree | 4940d3ff14fd918d9127c633b240e4888ef4c1a8 | |
parent | 967e892cb68cd6d49c063fff1f8dbce22e2bc20b (diff) | |
download | rneovim-023f67cad8d6fb3e435d0bcc815cbaec8b1692d5.tar.gz rneovim-023f67cad8d6fb3e435d0bcc815cbaec8b1692d5.tar.bz2 rneovim-023f67cad8d6fb3e435d0bcc815cbaec8b1692d5.zip |
terminal: Do not change 'number', 'relativenumber' (#6796)
Showing the 'number' column in terminal buffers is a bit silly because
of 'scrollback'. But it's mostly harmless and technically works as
expected.
The least surprising thing is to leave the user's settings alone. Since
there are tradeoffs in both cases, we choose inertia.
We still disable 'relativenumber' in *terminal-mode* (as opposed to
normal-mode) because it is totally broken: the Nvim cursor (not terminal
cursor) is always on the last line.
-rw-r--r-- | runtime/doc/nvim_terminal_emulator.txt | 5 | ||||
-rw-r--r-- | src/nvim/terminal.c | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt index cfe011250e..801ff75647 100644 --- a/runtime/doc/nvim_terminal_emulator.txt +++ b/runtime/doc/nvim_terminal_emulator.txt @@ -93,12 +93,11 @@ Terminal sets local defaults for some options, which may differ from your global configuration. - 'list' is disabled -- 'number' is disabled -- 'relativenumber' is disabled (cannot be changed in |Terminal-mode|) - 'wrap' is disabled +- 'relativenumber' is disabled in |Terminal-mode| (and cannot be enabled) You can change the defaults with a TermOpen autocommand: > - au TermOpen * setlocal number + au TermOpen * setlocal list Terminal colors can be customized with these variables: diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index b8b7085c5e..5b250ebf54 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -237,8 +237,6 @@ Terminal *terminal_open(TerminalOptions opts) curbuf->b_p_scbk = p_scbk; // 'scrollback' curbuf->b_p_tw = 0; // 'textwidth' set_option_value("wrap", false, NULL, OPT_LOCAL); - set_option_value("number", false, NULL, OPT_LOCAL); - set_option_value("relativenumber", false, NULL, OPT_LOCAL); set_option_value("list", false, NULL, OPT_LOCAL); buf_set_term_title(curbuf, (char *)curbuf->b_ffname); RESET_BINDING(curwin); |