diff options
author | SZEDER Gábor <szeder@ira.uka.de> | 2011-04-28 18:01:51 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-04-28 09:40:20 -0700 |
commit | 9244d69b96c209116390804c9af6bb1f5271ae18 (patch) | |
tree | 07744f38b27330f65925629ad7e26e873f6587a1 /git-gui/lib/date.tcl | |
parent | Start 1.7.6 cycle (diff) | |
download | tgif-9244d69b96c209116390804c9af6bb1f5271ae18.tar.xz |
completion: don't modify the $cur variable in completion functions
Since v1.7.4-rc0~11^2~2 (bash: get --pretty=m<tab> completion to work
with bash v4, 2010-12-02) we use _get_comp_words_by_ref() to access
completion-related variables, and the $cur variable holds the word
containing the current cursor position in all completion functions.
This $cur variable is left unchanged in most completion functions;
there are only four functions modifying its value, namely __gitcomp(),
__git_complete_revlist_file(), __git_complete_remote_or_refspec(), and
_git_config().
If this variable were never modified, then it would allow us a nice
optimisation and cleanup. Therefore, this patch assigns $cur to an
other local variable and uses that for later modifications in those
four functions.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib/date.tcl')
0 files changed, 0 insertions, 0 deletions