mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 13:58:18 +00:00
syntax: add const to syn_finish_line() params,vars
This commit is contained in:
@@ -1526,31 +1526,26 @@ int syntax_check_changed(linenr_T lnum)
|
|||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
syn_finish_line(
|
syn_finish_line(
|
||||||
bool syncing // called for syncing
|
const bool syncing // called for syncing
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
stateitem_T *cur_si;
|
|
||||||
colnr_T prev_current_col;
|
|
||||||
|
|
||||||
while (!current_finished) {
|
while (!current_finished) {
|
||||||
(void)syn_current_attr(syncing, false, NULL, false);
|
(void)syn_current_attr(syncing, false, NULL, false);
|
||||||
|
|
||||||
// When syncing, and found some item, need to check the item.
|
// When syncing, and found some item, need to check the item.
|
||||||
if (syncing && current_state.ga_len) {
|
if (syncing && current_state.ga_len) {
|
||||||
/*
|
// Check for match with sync item.
|
||||||
* Check for match with sync item.
|
const stateitem_T *const cur_si = &CUR_STATE(current_state.ga_len - 1);
|
||||||
*/
|
|
||||||
cur_si = &CUR_STATE(current_state.ga_len - 1);
|
|
||||||
if (cur_si->si_idx >= 0
|
if (cur_si->si_idx >= 0
|
||||||
&& (SYN_ITEMS(syn_block)[cur_si->si_idx].sp_flags
|
&& (SYN_ITEMS(syn_block)[cur_si->si_idx].sp_flags
|
||||||
& (HL_SYNC_HERE|HL_SYNC_THERE))) {
|
& (HL_SYNC_HERE|HL_SYNC_THERE))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* syn_current_attr() will have skipped the check for an item
|
// syn_current_attr() will have skipped the check for an item
|
||||||
* that ends here, need to do that now. Be careful not to go
|
// that ends here, need to do that now. Be careful not to go
|
||||||
* past the NUL. */
|
// past the NUL.
|
||||||
prev_current_col = current_col;
|
const colnr_T prev_current_col = current_col;
|
||||||
if (syn_getcurline()[current_col] != NUL) {
|
if (syn_getcurline()[current_col] != NUL) {
|
||||||
current_col++;
|
current_col++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user