diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-01-25 13:46:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 13:46:23 +0000 |
commit | e2a9d71521a1acdc5a554e3d9f54dfe543914db5 (patch) | |
tree | 07b5ac97f4770df35d8cf412b0a9c24f8c3a576d /src/nvim/edit.c | |
parent | b8288df99be8df701308167e4b0b497f003f25e9 (diff) | |
parent | 7bee622fdc72d7461ed43ea170cca20056891d2c (diff) | |
download | rneovim-e2a9d71521a1acdc5a554e3d9f54dfe543914db5.tar.gz rneovim-e2a9d71521a1acdc5a554e3d9f54dfe543914db5.tar.bz2 rneovim-e2a9d71521a1acdc5a554e3d9f54dfe543914db5.zip |
Merge pull request #21885 from lewis6991/refactor/options
Problems:
- Scope of local variables in options code is too large.
- did_set_string_option() is too large (>1000LOC).
- Setting options for a particular window or buffer requires a changing context (assigning curwin/curbuf).
Solutions:
- Reduce the scope of local variables.
- Break up did_set_string_option so it doesn't contain specific logic about each individual option (1038 LOC -> 310 LOC).
- Begin work on making functions not depend on curbuf or curwin and pass window or buffer handles explicitly.
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 32c035b028..095d73f53f 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -3474,7 +3474,7 @@ static void ins_ctrl_hat(void) State |= MODE_LANGMAP; } } - set_iminsert_global(); + set_iminsert_global(curbuf); showmode(); // Show/unshow value of 'keymap' in status lines. status_redraw_curbuf(); |