mirror of
https://github.com/neovim/neovim.git
synced 2024-12-26 14:11:15 -07:00
lint: clean-up after parent commits
This commit is contained in:
parent
1015aa6ff3
commit
a3549286b2
@ -2154,9 +2154,10 @@ static void correct_cmdspos(int idx, int cells)
|
|||||||
{
|
{
|
||||||
if (utfc_ptr2len(ccline.cmdbuff + idx) > 1
|
if (utfc_ptr2len(ccline.cmdbuff + idx) > 1
|
||||||
&& utf_ptr2cells(ccline.cmdbuff + idx) > 1
|
&& utf_ptr2cells(ccline.cmdbuff + idx) > 1
|
||||||
&& ccline.cmdspos % Columns + cells > Columns)
|
&& ccline.cmdspos % Columns + cells > Columns) {
|
||||||
ccline.cmdspos++;
|
ccline.cmdspos++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get an Ex command line for the ":" command.
|
* Get an Ex command line for the ":" command.
|
||||||
|
@ -2124,8 +2124,9 @@ static char_u *iconv_string(const vimconv_T *const vcp, char_u *str,
|
|||||||
* conversion from 'encoding' to something else. In other
|
* conversion from 'encoding' to something else. In other
|
||||||
* situations we don't know what to skip anyway. */
|
* situations we don't know what to skip anyway. */
|
||||||
*to++ = '?';
|
*to++ = '?';
|
||||||
if (utf_ptr2cells((char_u *)from) > 1)
|
if (utf_ptr2cells((char_u *)from) > 1) {
|
||||||
*to++ = '?';
|
*to++ = '?';
|
||||||
|
}
|
||||||
l = utfc_ptr2len_len((const char_u *)from, (int)fromlen);
|
l = utfc_ptr2len_len((const char_u *)from, (int)fromlen);
|
||||||
from += l;
|
from += l;
|
||||||
fromlen -= l;
|
fromlen -= l;
|
||||||
|
@ -2917,13 +2917,14 @@ win_line (
|
|||||||
|| (vcol + 1 == fromcol && n_extra == 0
|
|| (vcol + 1 == fromcol && n_extra == 0
|
||||||
&& utf_ptr2cells(ptr) > 1)
|
&& utf_ptr2cells(ptr) > 1)
|
||||||
|| ((int)vcol_prev == fromcol_prev
|
|| ((int)vcol_prev == fromcol_prev
|
||||||
&& vcol_prev < vcol /* not at margin */
|
&& vcol_prev < vcol // not at margin
|
||||||
&& vcol < tocol))
|
&& vcol < tocol)) {
|
||||||
area_attr = attr; /* start highlighting */
|
area_attr = attr; // start highlighting
|
||||||
else if (area_attr != 0
|
} else if (area_attr != 0 && (vcol == tocol
|
||||||
&& (vcol == tocol
|
|| (noinvcur
|
||||||
|| (noinvcur && (colnr_T)vcol == wp->w_virtcol)))
|
&& (colnr_T)vcol == wp->w_virtcol))) {
|
||||||
area_attr = 0; /* stop highlighting */
|
area_attr = 0; // stop highlighting
|
||||||
|
}
|
||||||
|
|
||||||
if (!n_extra) {
|
if (!n_extra) {
|
||||||
/*
|
/*
|
||||||
@ -6128,15 +6129,16 @@ void setcursor(void)
|
|||||||
{
|
{
|
||||||
if (redrawing()) {
|
if (redrawing()) {
|
||||||
validate_cursor();
|
validate_cursor();
|
||||||
|
int left_offset = curwin->w_wcol;
|
||||||
|
if (curwin->w_p_rl) {
|
||||||
|
// With 'rightleft' set and the cursor on a double-wide character,
|
||||||
|
// position it on the leftmost column.
|
||||||
|
left_offset = curwin->w_width - curwin->w_wcol
|
||||||
|
- ((utf_ptr2cells(get_cursor_pos_ptr()) == 2
|
||||||
|
&& vim_isprintc(gchar_cursor())) ? 2 : 1);
|
||||||
|
}
|
||||||
ui_cursor_goto(curwin->w_winrow + curwin->w_wrow,
|
ui_cursor_goto(curwin->w_winrow + curwin->w_wrow,
|
||||||
curwin->w_wincol + (
|
curwin->w_wincol + left_offset);
|
||||||
/* With 'rightleft' set and the cursor on a double-wide
|
|
||||||
* character, position it on the leftmost column. */
|
|
||||||
curwin->w_p_rl ? (curwin->w_width - curwin->w_wcol - (
|
|
||||||
(utf_ptr2cells(get_cursor_pos_ptr()) == 2
|
|
||||||
&& vim_isprintc(gchar_cursor())) ? 2 :
|
|
||||||
1)) :
|
|
||||||
curwin->w_wcol));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6967,7 +6969,7 @@ static void win_redr_ruler(win_T *wp, int always)
|
|||||||
}
|
}
|
||||||
get_rel_pos(wp, buffer + i, RULER_BUF_LEN - i);
|
get_rel_pos(wp, buffer + i, RULER_BUF_LEN - i);
|
||||||
}
|
}
|
||||||
/* Truncate at window boundary. */
|
// Truncate at window boundary.
|
||||||
o = 0;
|
o = 0;
|
||||||
for (i = 0; buffer[i] != NUL; i += utfc_ptr2len(buffer + i)) {
|
for (i = 0; buffer[i] != NUL; i += utfc_ptr2len(buffer + i)) {
|
||||||
o += utf_ptr2cells(buffer + i);
|
o += utf_ptr2cells(buffer + i);
|
||||||
|
Loading…
Reference in New Issue
Block a user