forked from aniani/vim
patch 8.1.0886: compiler warning for NULL pointer and condition always true
Problem: Compiler warning for adding to NULL pointer and a condition that is always true. Solution: Check for NULL pointer before adding. Remove useless "if". (Friedirch, closes #3913)
This commit is contained in:
18
src/search.c
18
src/search.c
@@ -4732,18 +4732,14 @@ current_search(
|
||||
VIsual_active = TRUE;
|
||||
VIsual_mode = 'v';
|
||||
|
||||
if (VIsual_active)
|
||||
redraw_curbuf_later(INVERTED); /* update the inversion */
|
||||
if (*p_sel == 'e')
|
||||
{
|
||||
redraw_curbuf_later(INVERTED); /* update the inversion */
|
||||
if (*p_sel == 'e')
|
||||
{
|
||||
/* Correction for exclusive selection depends on the direction. */
|
||||
if (forward && LTOREQ_POS(VIsual, curwin->w_cursor))
|
||||
inc_cursor();
|
||||
else if (!forward && LTOREQ_POS(curwin->w_cursor, VIsual))
|
||||
inc(&VIsual);
|
||||
}
|
||||
|
||||
/* Correction for exclusive selection depends on the direction. */
|
||||
if (forward && LTOREQ_POS(VIsual, curwin->w_cursor))
|
||||
inc_cursor();
|
||||
else if (!forward && LTOREQ_POS(curwin->w_cursor, VIsual))
|
||||
inc(&VIsual);
|
||||
}
|
||||
|
||||
#ifdef FEAT_FOLDING
|
||||
|
Reference in New Issue
Block a user