fix(normal): don't check conceal when pressing 'r' (#27892)

Problem:  Cursor line is unconcealed when pressing 'r' in Normal mode
          when 'concealcursor' contains 'n' but not 'i'.
Solution: Don't check conceal when pressing 'r' in Normal mode.

Vim doesn't have this problem because it doesn't call redrawWinline() in
conceal_check_cursor_line() and instead sets a global variable.
This commit is contained in:
zeertzjq
2024-03-17 09:44:10 +08:00
committed by GitHub
parent d114dbe9f7
commit c52dfb6e84
3 changed files with 23 additions and 2 deletions

View File

@@ -748,7 +748,7 @@ static void normal_get_additional_char(NormalState *s)
bool langmap_active = false; // using :lmap mappings
if (repl) {
State = MODE_REPLACE; // pretend Replace mode
ui_cursor_shape(); // show different cursor shape
ui_cursor_shape_no_check_conceal(); // show different cursor shape
}
if (lang && curbuf->b_p_iminsert == B_IMODE_LMAP) {
// Allow mappings defined with ":lmap".