aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/textobject.c
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-09-12 10:57:44 -0600
committerJosh Rahm <rahm@google.com>2022-09-12 10:57:44 -0600
commitb29022c9dd6c5abb210b8b29f91b36965bb533db (patch)
tree09feab4dd897a6df927f2410c4cfda26ab7750ac /src/nvim/textobject.c
parent4066fa85abef16fa23c30e94dc4d2bfb3b9c4545 (diff)
parentfd70e2bff2440181f63fe124738cf2a025d1e6a5 (diff)
downloadrneovim-b29022c9dd6c5abb210b8b29f91b36965bb533db.tar.gz
rneovim-b29022c9dd6c5abb210b8b29f91b36965bb533db.tar.bz2
rneovim-b29022c9dd6c5abb210b8b29f91b36965bb533db.zip
Merge remote-tracking branch 'upstream/master' into colorcolchar
Diffstat (limited to 'src/nvim/textobject.c')
-rw-r--r--src/nvim/textobject.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/textobject.c b/src/nvim/textobject.c
index 02174edeb1..621efa44cf 100644
--- a/src/nvim/textobject.c
+++ b/src/nvim/textobject.c
@@ -213,13 +213,13 @@ bool findpar(bool *pincl, int dir, long count, int what, bool both)
}
curwin->w_cursor.lnum = curr;
if (curr == curbuf->b_ml.ml_line_count && what != '}') {
- char_u *line = ml_get(curr);
+ char_u *line = (char_u *)ml_get(curr);
// Put the cursor on the last character in the last line and make the
// motion inclusive.
if ((curwin->w_cursor.col = (colnr_T)STRLEN(line)) != 0) {
curwin->w_cursor.col--;
- curwin->w_cursor.col -= utf_head_off(line, line + curwin->w_cursor.col);
+ curwin->w_cursor.col -= utf_head_off((char *)line, (char *)line + curwin->w_cursor.col);
*pincl = true;
}
} else {
@@ -260,7 +260,7 @@ bool startPS(linenr_T lnum, int para, bool both)
{
char_u *s;
- s = ml_get(lnum);
+ s = (char_u *)ml_get(lnum);
if (*s == para || *s == '\f' || (both && *s == '}')) {
return true;
}
@@ -1032,7 +1032,7 @@ int current_block(oparg_T *oap, long count, bool include, int what, int other)
/// @return true if the cursor is on a "<aaa>" tag. Ignore "<aaa/>".
static bool in_html_tag(bool end_tag)
{
- char_u *line = get_cursor_line_ptr();
+ char_u *line = (char_u *)get_cursor_line_ptr();
char_u *p;
int c;
int lc = NUL;
@@ -1157,7 +1157,7 @@ again:
// Search for matching "</aaa>". First isolate the "aaa".
inc_cursor();
- p = get_cursor_pos_ptr();
+ p = (char_u *)get_cursor_pos_ptr();
for (cp = p;
*cp != NUL && *cp != '>' && !ascii_iswhite(*cp);
MB_PTR_ADV(cp)) {}
@@ -1196,7 +1196,7 @@ again:
}
}
} else {
- char_u *c = get_cursor_pos_ptr();
+ char_u *c = (char_u *)get_cursor_pos_ptr();
// Exclude the '<' of the end tag.
// If the closing tag is on new line, do not decrement cursor, but make
// operation exclusive, so that the linefeed will be selected
@@ -1467,7 +1467,7 @@ static int find_prev_quote(char_u *line, int col_start, int quotechar, char_u *e
while (col_start > 0) {
col_start--;
- col_start -= utf_head_off(line, line + col_start);
+ col_start -= utf_head_off((char *)line, (char *)line + col_start);
n = 0;
if (escape != NULL) {
while (col_start - n > 0 && vim_strchr((char *)escape,
@@ -1493,7 +1493,7 @@ static int find_prev_quote(char_u *line, int col_start, int quotechar, char_u *e
bool current_quote(oparg_T *oap, long count, bool include, int quotechar)
FUNC_ATTR_NONNULL_ALL
{
- char_u *line = get_cursor_line_ptr();
+ char_u *line = (char_u *)get_cursor_line_ptr();
int col_end;
int col_start = curwin->w_cursor.col;
bool inclusive = false;