mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 18:41:48 +00:00
ui: Move check_col/check_row functions to mbyte.c
These functions were only being used by mbyte.c, so move them and add the "static" modifier.
This commit is contained in:
@@ -102,26 +102,3 @@ void ui_cursor_shape(void)
|
||||
conceal_check_cursur_line();
|
||||
}
|
||||
|
||||
/*
|
||||
* Check bounds for column number
|
||||
*/
|
||||
int check_col(int col)
|
||||
{
|
||||
if (col < 0)
|
||||
return 0;
|
||||
if (col >= (int)screen_Columns)
|
||||
return (int)screen_Columns - 1;
|
||||
return col;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check bounds for row number
|
||||
*/
|
||||
int check_row(int row)
|
||||
{
|
||||
if (row < 0)
|
||||
return 0;
|
||||
if (row >= (int)screen_Rows)
|
||||
return (int)screen_Rows - 1;
|
||||
return row;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user