aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-22 11:33:55 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-23 18:17:09 -0400
commit450d9e6bdf8c05329245a0c61e26b1eb97f783cf (patch)
treedd1d8af525648136616964f8ff3d202b604278f6 /src
parent1935cc263993a9c0cb1bae510347a7c344b5b37c (diff)
downloadrneovim-450d9e6bdf8c05329245a0c61e26b1eb97f783cf.tar.gz
rneovim-450d9e6bdf8c05329245a0c61e26b1eb97f783cf.tar.bz2
rneovim-450d9e6bdf8c05329245a0c61e26b1eb97f783cf.zip
vim-patch:8.1.0270: checking for a Tab in a line could be faster
Problem: Checking for a Tab in a line could be faster. Solution: Use strchr() instead of strrchr(). (closes vim/vim#3312) https://github.com/vim/vim/commit/b31a3acce13231643b006988c1ce76b8a12b2982
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 71ed5f6ec1..17b66fd32c 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -335,7 +335,7 @@ static int linelen(int *has_tab)
len = linetabsize(line);
// Check for embedded TAB.
if (has_tab != NULL) {
- *has_tab = STRRCHR(first, TAB) != NULL;
+ *has_tab = vim_strchr(first, TAB) != NULL;
}
*last = save;