Mercurial > vim
comparison src/edit.c @ 26944:8dbdd68627bd v8.2.4001
patch 8.2.4001: insert complete code uses global variables
Commit: https://github.com/vim/vim/commit/d94fbfc74a8b8073e7a256c95fa6f39fc527c726
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue Jan 4 17:01:44 2022 +0000
patch 8.2.4001: insert complete code uses global variables
Problem: Insert complete code uses global variables.
Solution: Make variables local to the file and use accessor functions.
(Yegappan Lakshmanan, closes #9470)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 04 Jan 2022 18:15:03 +0100 |
parents | 7f150a4936f2 |
children | 268f6a3511df |
comparison
equal
deleted
inserted
replaced
26943:61f686b38df9 | 26944:8dbdd68627bd |
---|---|
1278 case Ctrl_N: | 1278 case Ctrl_N: |
1279 // if 'complete' is empty then plain ^P is no longer special, | 1279 // if 'complete' is empty then plain ^P is no longer special, |
1280 // but it is under other ^X modes | 1280 // but it is under other ^X modes |
1281 if (*curbuf->b_p_cpt == NUL | 1281 if (*curbuf->b_p_cpt == NUL |
1282 && (ctrl_x_mode_normal() || ctrl_x_mode_whole_line()) | 1282 && (ctrl_x_mode_normal() || ctrl_x_mode_whole_line()) |
1283 && !(compl_cont_status & CONT_LOCAL)) | 1283 && !compl_status_local()) |
1284 goto normalchar; | 1284 goto normalchar; |
1285 | 1285 |
1286 docomplete: | 1286 docomplete: |
1287 compl_busy = TRUE; | 1287 compl_busy = TRUE; |
1288 #ifdef FEAT_FOLDING | 1288 #ifdef FEAT_FOLDING |
1289 disable_fold_update++; // don't redraw folds here | 1289 disable_fold_update++; // don't redraw folds here |
1290 #endif | 1290 #endif |
1291 if (ins_complete(c, TRUE) == FAIL) | 1291 if (ins_complete(c, TRUE) == FAIL) |
1292 compl_cont_status = 0; | 1292 compl_status_clear(); |
1293 #ifdef FEAT_FOLDING | 1293 #ifdef FEAT_FOLDING |
1294 disable_fold_update--; | 1294 disable_fold_update--; |
1295 #endif | 1295 #endif |
1296 compl_busy = FALSE; | 1296 compl_busy = FALSE; |
1297 break; | 1297 break; |