summaryrefslogtreecommitdiff
path: root/git-gui/lib/spellcheck.tcl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-15 01:31:15 -0700
committerJunio C Hamano <gitster@pobox.com>2008-05-15 01:31:15 -0700
commit1fbb58b4153e90eda08c2b022ee32d90729582e6 (patch)
treeab3b850ab1c4f7d46be319133193d7fd7c0d6cb2 /git-gui/lib/spellcheck.tcl
parent58949bb18a1610d109e64e997c41696e0dfe97c3 (diff)
parent76bb40cde0e15e8d0e8493abb0bd18a5d6386ad7 (diff)
downloadgit-1fbb58b4153e90eda08c2b022ee32d90729582e6.tar.gz
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui: git-gui: Delete branches with 'git branch -D' to clear config git-gui: Setup branch.remote,merge for shorthand git-pull git-gui: Update German translation git-gui: Don't use '$$cr master' with aspell earlier than 0.60 git-gui: Report less precise object estimates for database compression
Diffstat (limited to 'git-gui/lib/spellcheck.tcl')
-rw-r--r--git-gui/lib/spellcheck.tcl14
1 files changed, 10 insertions, 4 deletions
diff --git a/git-gui/lib/spellcheck.tcl b/git-gui/lib/spellcheck.tcl
index 9be748683c..78f344f08f 100644
--- a/git-gui/lib/spellcheck.tcl
+++ b/git-gui/lib/spellcheck.tcl
@@ -84,13 +84,19 @@ method _connect {pipe_fd} {
regexp \
{International Ispell Version .* \(but really (Aspell .*?)\)$} \
$s_version _junk s_version
+ regexp {^Aspell (\d)+\.(\d+)} $s_version _junk major minor
puts $pipe_fd ! ; # enable terse mode
- puts $pipe_fd {$$cr master} ; # fetch the language
- flush $pipe_fd
- gets $pipe_fd s_lang
- regexp {[/\\]([^/\\]+)\.[^\.]+$} $s_lang _ s_lang
+ # fetch the language
+ if {$major > 0 || ($major == 0 && $minor >= 60)} {
+ puts $pipe_fd {$$cr master}
+ flush $pipe_fd
+ gets $pipe_fd s_lang
+ regexp {[/\\]([^/\\]+)\.[^\.]+$} $s_lang _ s_lang
+ } else {
+ set s_lang {}
+ }
if {$::default_config(gui.spellingdictionary) eq {}
&& [get_config gui.spellingdictionary] eq {}} {