summaryrefslogtreecommitdiffstats
path: root/src/memline.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-13 20:42:26 +0100
committerChristian Brabandt <cb@256bit.org>2024-03-13 20:42:26 +0100
commit8c55d60658b7ee3458dca57fc5eec90ca9bb9bf3 (patch)
treedddeb0a5cbbbf48122ed92f5ee1ab512d852ac22 /src/memline.c
parent253ff4dece4e6cc4a9ff3ed935bc78f832b6fb7c (diff)
patch 9.1.0177: Coverity reports dead codev9.1.0177
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>
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/memline.c b/src/memline.c
index a1c29cf0e7..5ca50fc1c9 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -2686,7 +2686,7 @@ ml_get_len(linenr_T lnum)
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 cursor line
@@ -3582,7 +3582,7 @@ ml_replace(linenr_T lnum, char_u *line, int copy)
* Replace a line for the current buffer. Like ml_replace() with:
* "len_arg" is the length of the text, excluding NUL.
* If "has_props" is TRUE then "line_arg" includes the text properties and
- * "len_arg" includes the NUL of the text.
+ * "len_arg" includes the NUL of the text and text properties.
* When "copy" is TRUE copy the text into allocated memory, otherwise
* "line_arg" must be allocated and will be consumed here.
*/