mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
vim-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: vim/vim#14189
8c55d60658
This commit is contained in:
@@ -1843,7 +1843,7 @@ colnr_T ml_get_len(linenr_T lnum)
|
||||
/// @return length (excluding the NUL) of the text after position "pos".
|
||||
colnr_T ml_get_pos_len(pos_T *pos)
|
||||
{
|
||||
return ml_get_buf_len(curbuf, curwin->w_cursor.lnum) - pos->col;
|
||||
return ml_get_buf_len(curbuf, pos->lnum) - pos->col;
|
||||
}
|
||||
|
||||
/// @return length (excluding the NUL) of the given line in the given buffer.
|
||||
|
Reference in New Issue
Block a user