Mercurial > vim
comparison src/edit.c @ 18534:7dd83b5325e9 v8.1.2261
patch 8.1.2261: with modifyOtherKeys set 'noesckeys' doesn't work
Commit: https://github.com/vim/vim/commit/177c9f2f06b048f4c1e154d29423edf65b128f8c
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Nov 6 13:59:16 2019 +0100
patch 8.1.2261: with modifyOtherKeys set 'noesckeys' doesn't work
Problem: With modifyOtherKeys set 'noesckeys' doesn't work. (James McCoy)
Solution: Disable modifyOtherKeys while in Insert mode when 'noesckeys' is
set. (closes #5180)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 06 Nov 2019 14:00:03 +0100 |
parents | 9f51d0cef8da |
children | 8b0114ffde2b |
comparison
equal
deleted
inserted
replaced
18533:ec5306efdc01 | 18534:7dd83b5325e9 |
---|---|
321 revins_chars = 0; | 321 revins_chars = 0; |
322 revins_legal = 0; | 322 revins_legal = 0; |
323 revins_scol = -1; | 323 revins_scol = -1; |
324 #endif | 324 #endif |
325 if (!p_ek) | 325 if (!p_ek) |
326 /* Disable bracketed paste mode, we won't recognize the escape | 326 { |
327 * sequences. */ | 327 // Disable bracketed paste mode, we won't recognize the escape |
328 // sequences. | |
328 out_str(T_BD); | 329 out_str(T_BD); |
330 | |
331 // Disable modifyOtherKeys, keys with modifiers would cause exiting | |
332 // Insert mode. | |
333 out_str(T_CTE); | |
334 } | |
329 | 335 |
330 /* | 336 /* |
331 * Handle restarting Insert mode. | 337 * Handle restarting Insert mode. |
332 * Don't do this for "CTRL-O ." (repeat an insert): In that case we get | 338 * Don't do this for "CTRL-O ." (repeat an insert): In that case we get |
333 * here with something in the stuff buffer. | 339 * here with something in the stuff buffer. |
4218 /* need to position cursor again (e.g. when on a TAB ) */ | 4224 /* need to position cursor again (e.g. when on a TAB ) */ |
4219 changed_cline_bef_curs(); | 4225 changed_cline_bef_curs(); |
4220 | 4226 |
4221 setmouse(); | 4227 setmouse(); |
4222 #ifdef CURSOR_SHAPE | 4228 #ifdef CURSOR_SHAPE |
4223 ui_cursor_shape(); /* may show different cursor shape */ | 4229 ui_cursor_shape(); // may show different cursor shape |
4224 #endif | 4230 #endif |
4225 if (!p_ek) | 4231 if (!p_ek) |
4226 /* Re-enable bracketed paste mode. */ | 4232 { |
4233 // Re-enable bracketed paste mode. | |
4227 out_str(T_BE); | 4234 out_str(T_BE); |
4235 | |
4236 // Re-enable modifyOtherKeys. | |
4237 out_str(T_CTI); | |
4238 } | |
4228 | 4239 |
4229 // When recording or for CTRL-O, need to display the new mode. | 4240 // When recording or for CTRL-O, need to display the new mode. |
4230 // Otherwise remove the mode message. | 4241 // Otherwise remove the mode message. |
4231 if (reg_recording != 0 || restart_edit != NUL) | 4242 if (reg_recording != 0 || restart_edit != NUL) |
4232 showmode(); | 4243 showmode(); |
4233 else if (p_smd && (got_int || !skip_showmode())) | 4244 else if (p_smd && (got_int || !skip_showmode())) |
4234 msg(""); | 4245 msg(""); |
4235 | 4246 |
4236 return TRUE; /* exit Insert mode */ | 4247 return TRUE; // exit Insert mode |
4237 } | 4248 } |
4238 | 4249 |
4239 #ifdef FEAT_RIGHTLEFT | 4250 #ifdef FEAT_RIGHTLEFT |
4240 /* | 4251 /* |
4241 * Toggle language: hkmap and revins_on. | 4252 * Toggle language: hkmap and revins_on. |