aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/textobject.c
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-10-11 19:00:34 +0000
committerJosh Rahm <rahm@google.com>2022-10-11 19:00:34 +0000
commitc367400b73d207833d51e09d663f969ffab37531 (patch)
treebc26006d942509a92b514107f9d8dca6d3911128 /src/nvim/textobject.c
parent4066fa85abef16fa23c30e94dc4d2bfb3b9c4545 (diff)
parent760b399f6c0c6470daa0663752bd22886997f9e6 (diff)
downloadrneovim-c367400b73d207833d51e09d663f969ffab37531.tar.gz
rneovim-c367400b73d207833d51e09d663f969ffab37531.tar.bz2
rneovim-c367400b73d207833d51e09d663f969ffab37531.zip
Merge remote-tracking branch 'upstream/master' into colorcolchar
Diffstat (limited to 'src/nvim/textobject.c')
-rw-r--r--src/nvim/textobject.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/textobject.c b/src/nvim/textobject.c
index 02174edeb1..e6b330cbf1 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;
@@ -1503,7 +1503,7 @@ bool current_quote(oparg_T *oap, long count, bool include, int quotechar)
bool inside_quotes = false; // Looks like "i'" done before
bool selected_quote = false; // Has quote inside selection
int i;
- bool restore_vis_bef = false; // resotre VIsual on abort
+ bool restore_vis_bef = false; // restore VIsual on abort
// When 'selection' is "exclusive" move the cursor to where it would be
// with 'selection' "inclusive", so that the logic is the same for both.