comparison src/quickfix.c @ 34552:fd15dc02c223 v9.1.0177

patch 9.1.0177: Coverity reports dead code Commit: https://github.com/vim/vim/commit/8c55d60658b7ee3458dca57fc5eec90ca9bb9bf3 Author: zeertzjq <zeertzjq@outlook.com> Date: Wed Mar 13 20:42:26 2024 +0100 patch 9.1.0177: Coverity reports dead code Problem: Coverity reports dead code. Solution: Remove the dead code. Also fix a mistake in ml_get_pos_len() and update some comments (zeertzjq). closes: #14189 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 13 Mar 2024 21:00:03 +0100
parents 9e093c96dff6
children 159d598e6781
comparison
equal deleted inserted replaced
34551:a2aa0fddd4e7 34552:fd15dc02c223
6201 } 6201 }
6202 } 6202 }
6203 else 6203 else
6204 { 6204 {
6205 char_u *str = ml_get_buf(buf, lnum, FALSE); 6205 char_u *str = ml_get_buf(buf, lnum, FALSE);
6206 int line_len = ml_get_buf_len(buf, lnum); 6206 colnr_T linelen = ml_get_buf_len(buf, lnum);
6207 int score; 6207 int score;
6208 int_u matches[MAX_FUZZY_MATCHES]; 6208 int_u matches[MAX_FUZZY_MATCHES];
6209 int_u sz = ARRAY_LENGTH(matches); 6209 int_u sz = ARRAY_LENGTH(matches);
6210 6210
6211 // Fuzzy string match 6211 // Fuzzy string match
6240 if (--*tomatch == 0) 6240 if (--*tomatch == 0)
6241 break; 6241 break;
6242 if ((flags & VGR_GLOBAL) == 0) 6242 if ((flags & VGR_GLOBAL) == 0)
6243 break; 6243 break;
6244 col = matches[pat_len - 1] + col + 1; 6244 col = matches[pat_len - 1] + col + 1;
6245 if (col > line_len) 6245 if (col > linelen)
6246 break; 6246 break;
6247 } 6247 }
6248 } 6248 }
6249 line_breakcheck(); 6249 line_breakcheck();
6250 if (got_int) 6250 if (got_int)
6610 { 6610 {
6611 decr_quickfix_busy(); 6611 decr_quickfix_busy();
6612 goto theend; 6612 goto theend;
6613 } 6613 }
6614 6614
6615 // Jump to first match if the current window is not 'winfixbuf' 6615 // Jump to first match.
6616 if (!qf_list_empty(qf_get_curlist(qi))) 6616 if (!qf_list_empty(qf_get_curlist(qi)))
6617 { 6617 {
6618 if ((args.flags & VGR_NOJUMP) == 0) 6618 if ((args.flags & VGR_NOJUMP) == 0)
6619 vgr_jump_to_match(qi, eap->forceit, &redraw_for_dummy, 6619 vgr_jump_to_match(qi, eap->forceit, &redraw_for_dummy,
6620 first_match_buf, target_dir); 6620 first_match_buf, target_dir);