Fossil SCM
Fix key bindings on the "fossil diff --tk" command. Control-q now exits. Pressing Enter does the right things at the right times and does not raise errors. Etc.
Commit
4dfa592f27f88e82d0d4aa3714fbe1df99f6d7e46cc3f904ff3413acd0c2c7ac
Parent
d02c1042a5c0757…
1 file changed
+6
-5
+6
-5
| --- src/diff.tcl | ||
| +++ src/diff.tcl | ||
| @@ -232,21 +232,21 @@ | ||
| 232 | 232 | # Keystroke bindings for on the top-level window for navigation and |
| 233 | 233 | # control also fire when those same keystrokes are pressed in the |
| 234 | 234 | # Search entry box. Disable them, to prevent the diff screen from |
| 235 | 235 | # disappearing abruptly and unexpectedly when searching for "q". |
| 236 | 236 | # |
| 237 | -# bind . <q> exit | |
| 238 | -# bind . <p> {catch searchPrev; break} | |
| 239 | -# bind . <n> {catch searchNext; break} | |
| 240 | -# bind . <Escape><Escape> exit | |
| 237 | +bind . <Control-q> exit | |
| 238 | +bind . <Control-p> {catch searchPrev; break} | |
| 239 | +bind . <Control-n> {catch searchNext; break} | |
| 240 | +bind . <Escape><Escape> exit | |
| 241 | 241 | bind . <Destroy> {after 0 exit} |
| 242 | 242 | bind . <Tab> {cycleDiffs; break} |
| 243 | 243 | bind . <<PrevWindow>> {cycleDiffs 1; break} |
| 244 | 244 | bind . <Control-f> {searchOnOff; break} |
| 245 | 245 | bind . <Control-g> {catch searchNext; break} |
| 246 | 246 | bind . <Return> { |
| 247 | - event generate bb.files <1> | |
| 247 | + event generate .bb.files <1> | |
| 248 | 248 | event generate .bb.files <ButtonRelease-1> |
| 249 | 249 | break |
| 250 | 250 | } |
| 251 | 251 | foreach {key axis args} { |
| 252 | 252 | Up y {scroll -5 units} |
| @@ -395,10 +395,11 @@ | ||
| 395 | 395 | if {[info exists ::search]} { |
| 396 | 396 | unset ::search |
| 397 | 397 | .txtA tag remove search 1.0 end |
| 398 | 398 | .txtB tag remove search 1.0 end |
| 399 | 399 | pack forget .bb.sframe |
| 400 | + focus . | |
| 400 | 401 | } else { |
| 401 | 402 | set ::search .txtA |
| 402 | 403 | if {![winfo exists .bb.sframe]} { |
| 403 | 404 | frame .bb.sframe |
| 404 | 405 | ::ttk::entry .bb.sframe.e -width 10 |
| 405 | 406 |
| --- src/diff.tcl | |
| +++ src/diff.tcl | |
| @@ -232,21 +232,21 @@ | |
| 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 | foreach {key axis args} { |
| 252 | Up y {scroll -5 units} |
| @@ -395,10 +395,11 @@ | |
| 395 | if {[info exists ::search]} { |
| 396 | unset ::search |
| 397 | .txtA tag remove search 1.0 end |
| 398 | .txtB tag remove search 1.0 end |
| 399 | pack forget .bb.sframe |
| 400 | } else { |
| 401 | set ::search .txtA |
| 402 | if {![winfo exists .bb.sframe]} { |
| 403 | frame .bb.sframe |
| 404 | ::ttk::entry .bb.sframe.e -width 10 |
| 405 |
| --- src/diff.tcl | |
| +++ src/diff.tcl | |
| @@ -232,21 +232,21 @@ | |
| 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 . <Control-q> exit |
| 238 | bind . <Control-p> {catch searchPrev; break} |
| 239 | bind . <Control-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 | foreach {key axis args} { |
| 252 | Up y {scroll -5 units} |
| @@ -395,10 +395,11 @@ | |
| 395 | if {[info exists ::search]} { |
| 396 | unset ::search |
| 397 | .txtA tag remove search 1.0 end |
| 398 | .txtB tag remove search 1.0 end |
| 399 | pack forget .bb.sframe |
| 400 | focus . |
| 401 | } else { |
| 402 | set ::search .txtA |
| 403 | if {![winfo exists .bb.sframe]} { |
| 404 | frame .bb.sframe |
| 405 | ::ttk::entry .bb.sframe.e -width 10 |
| 406 |