Mercurial > vim
comparison src/indent.c @ 17809:59f8948b7590 v8.1.1901
patch 8.1.1901: the +insert_expand feature is not always available
Commit: https://github.com/vim/vim/commit/e2c453d38f6512ac4cff7cd26aa7780b4e2534d7
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 21 14:37:09 2019 +0200
patch 8.1.1901: the +insert_expand feature is not always available
Problem: The +insert_expand feature is not always available.
Solution: Graduate the +insert_expand feature.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 21 Aug 2019 14:45:04 +0200 |
parents | 0f7ae8010787 |
children | 079e10a49ea1 |
comparison
equal
deleted
inserted
replaced
17808:42561b61bfd8 | 17809:59f8948b7590 |
---|---|
4108 if ((try_match || try_match_word) | 4108 if ((try_match || try_match_word) |
4109 && curwin->w_cursor.col >= (colnr_T)(p - look)) | 4109 && curwin->w_cursor.col >= (colnr_T)(p - look)) |
4110 { | 4110 { |
4111 int match = FALSE; | 4111 int match = FALSE; |
4112 | 4112 |
4113 #ifdef FEAT_INS_EXPAND | |
4114 if (keytyped == KEY_COMPLETE) | 4113 if (keytyped == KEY_COMPLETE) |
4115 { | 4114 { |
4116 char_u *s; | 4115 char_u *s; |
4117 | 4116 |
4118 // Just completed a word, check if it starts with "look". | 4117 // Just completed a word, check if it starts with "look". |
4138 ? MB_STRNICMP(s, look, p - look) | 4137 ? MB_STRNICMP(s, look, p - look) |
4139 : STRNCMP(s, look, p - look)) == 0) | 4138 : STRNCMP(s, look, p - look)) == 0) |
4140 match = TRUE; | 4139 match = TRUE; |
4141 } | 4140 } |
4142 else | 4141 else |
4143 #endif | |
4144 // TODO: multi-byte | 4142 // TODO: multi-byte |
4145 if (keytyped == (int)p[-1] || (icase && keytyped < 256 | 4143 if (keytyped == (int)p[-1] || (icase && keytyped < 256 |
4146 && TOLOWER_LOC(keytyped) == TOLOWER_LOC((int)p[-1]))) | 4144 && TOLOWER_LOC(keytyped) == TOLOWER_LOC((int)p[-1]))) |
4147 { | 4145 { |
4148 line = ml_get_cursor(); | 4146 line = ml_get_cursor(); |