git-gui: Only bind the spellcheck popup suggestion hook once
[gitweb.git] / lib / spellcheck.tcl
index f359356c84d01b14ddd3168ea39f5688a7463656..a37ff5f8f315e56270bec45ea4fa7394fb0a43af 100644 (file)
@@ -23,6 +23,7 @@ constructor init {pipe_fd ui_text ui_menu} {
        set w_menu $ui_menu
        array unset s_suggest
 
+       bind_button3 $w_text [cb _popup_suggest %X %Y @%x,%y]
        _connect $this $pipe_fd
        return $this
 }
@@ -66,7 +67,6 @@ method _connect {pipe_fd} {
        $w_text tag conf misspelled \
                -foreground red \
                -underline 1
-       bind_button3 $w_text [cb _popup_suggest %X %Y @%x,%y]
 
        array unset s_suggest
        set s_seen    [list]