Fossil SCM

Disable navigation key binds in the --tk diff screen. Otherwise, pressing "q" in the Search entry box causes the whole diff window to die.

drh 2016-08-01 13:50 trunk
Commit f6d9583173cbd6d2b170fac338721c6b10ed9456
1 file changed +9 -4
+9 -4
--- src/diff.tcl
+++ src/diff.tcl
@@ -227,19 +227,24 @@
227227
}
228228
229229
wm withdraw .
230230
wm title . $CFG(TITLE)
231231
wm iconname . $CFG(TITLE)
232
-bind . <q> exit
233
-bind . <Escape><Escape> exit
232
+# Keystroke bindings for on the top-level window for navigation and
233
+# control also fire when those same keystrokes are pressed in the
234
+# Search entry box. Disable them, to prevent the diff screen from
235
+# disappearing abruptly and unexpectedly when searching for "q".
236
+#
237
+# bind . <q> exit
238
+# bind . <p> {catch searchPrev; break}
239
+# bind . <n> {catch searchNext; break}
240
+# bind . <Escape><Escape> exit
234241
bind . <Destroy> {after 0 exit}
235242
bind . <Tab> {cycleDiffs; break}
236243
bind . <<PrevWindow>> {cycleDiffs 1; break}
237244
bind . <Control-f> {searchOnOff; break}
238
-bind . <n> {catch searchNext; break}
239245
bind . <Control-g> {catch searchNext; break}
240
-bind . <p> {catch searchPrev; break}
241246
bind . <Return> {
242247
event generate bb.files <1>
243248
event generate .bb.files <ButtonRelease-1>
244249
break
245250
}
246251
--- src/diff.tcl
+++ src/diff.tcl
@@ -227,19 +227,24 @@
227 }
228
229 wm withdraw .
230 wm title . $CFG(TITLE)
231 wm iconname . $CFG(TITLE)
232 bind . <q> exit
233 bind . <Escape><Escape> exit
 
 
 
 
 
 
 
234 bind . <Destroy> {after 0 exit}
235 bind . <Tab> {cycleDiffs; break}
236 bind . <<PrevWindow>> {cycleDiffs 1; break}
237 bind . <Control-f> {searchOnOff; break}
238 bind . <n> {catch searchNext; break}
239 bind . <Control-g> {catch searchNext; break}
240 bind . <p> {catch searchPrev; break}
241 bind . <Return> {
242 event generate bb.files <1>
243 event generate .bb.files <ButtonRelease-1>
244 break
245 }
246
--- src/diff.tcl
+++ src/diff.tcl
@@ -227,19 +227,24 @@
227 }
228
229 wm withdraw .
230 wm title . $CFG(TITLE)
231 wm iconname . $CFG(TITLE)
232 # Keystroke bindings for on the top-level window for navigation and
233 # control also fire when those same keystrokes are pressed in the
234 # Search entry box. Disable them, to prevent the diff screen from
235 # disappearing abruptly and unexpectedly when searching for "q".
236 #
237 # bind . <q> exit
238 # bind . <p> {catch searchPrev; break}
239 # bind . <n> {catch searchNext; break}
240 # bind . <Escape><Escape> exit
241 bind . <Destroy> {after 0 exit}
242 bind . <Tab> {cycleDiffs; break}
243 bind . <<PrevWindow>> {cycleDiffs 1; break}
244 bind . <Control-f> {searchOnOff; break}
 
245 bind . <Control-g> {catch searchNext; break}
 
246 bind . <Return> {
247 event generate bb.files <1>
248 event generate .bb.files <ButtonRelease-1>
249 break
250 }
251

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button