mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
fix(inccommand): avoid crash if callback changes inccommand option (#18830)
clang: Result of operation is garbage or undefined clang: Uninitialized argument value Also check for == 's' instead of != 'n' as it is more straightforward. Also fix another unrelated PVS warning: PVS/V1071: Return value of win_comp_pos() is not always used
This commit is contained in:
@@ -5872,7 +5872,7 @@ static int show_sub(exarg_T *eap, pos_T old_cusr, PreviewLines *preview_lines, i
|
||||
linenr_T highest_num_line = 0;
|
||||
int col_width = 0;
|
||||
// Use preview window only when inccommand=split and range is not just the current line
|
||||
bool preview = (*p_icm != 'n') && (eap->line1 != old_cusr.lnum || eap->line2 != old_cusr.lnum);
|
||||
bool preview = (*p_icm == 's') && (eap->line1 != old_cusr.lnum || eap->line2 != old_cusr.lnum);
|
||||
|
||||
if (preview) {
|
||||
cmdpreview_buf = buflist_findnr(cmdpreview_bufnr);
|
||||
|
Reference in New Issue
Block a user