about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-11-20 09:52:05 +0000
committerPeter Stephenson <pws@zsh.org>2017-11-20 09:52:05 +0000
commite2f793e7df7214cc3d80e2fcfe961ed087c860ab (patch)
tree0da26e30573f4ca70d9ff82e99fa85d0e598bc51
parent09939216d4c00264ba224bfec2b1be8c6fd11fd5 (diff)
downloadzsh-e2f793e7df7214cc3d80e2fcfe961ed087c860ab.tar.gz
zsh-e2f793e7df7214cc3d80e2fcfe961ed087c860ab.tar.xz
zsh-e2f793e7df7214cc3d80e2fcfe961ed087c860ab.zip
42037: COMP_POINT for bash completion was miscalculated.
-rw-r--r--ChangeLog5
-rw-r--r--Completion/bashcompinit2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e049e276..a06011793 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-11-20  Peter Stephenson  <p.stephenson@samsung.com>
+
+	* Evan Underscore / pws: 42037: Completion/bashcompinit: recent
+	change caused wrong word to be used for COMP_POINT.
+
 2017-11-13  Oliver Kiddle  <opk@zsh.org>
 
 	* 42019: Completion/Unix/Command/_git: update options to 2.15
diff --git a/Completion/bashcompinit b/Completion/bashcompinit
index 902fa88a8..02290a16f 100644
--- a/Completion/bashcompinit
+++ b/Completion/bashcompinit
@@ -8,7 +8,7 @@ _bash_complete() {
   local -x COMP_LINE="$words"
   local -A savejobstates savejobtexts
 
-  (( COMP_POINT = 1 + ${#${(j. .)words[1,CURRENT]}} + $#QIPREFIX + $#IPREFIX + $#PREFIX ))
+  (( COMP_POINT = 1 + ${#${(j. .)words[1,CURRENT-1]}} + $#QIPREFIX + $#IPREFIX + $#PREFIX ))
   (( COMP_CWORD = CURRENT - 1))
   COMP_WORDS=( $words )
   BASH_VERSINFO=( 2 05b 0 1 release )