Fossil SCM
Shortcut SHIFT+H to scroll to the focused entry without moving focus. This may be handy in conjunction with scrolling by arrow keys or PgUp/Dn.
Commit
8d1edb82061eb09e4fcbdc2fb13b78cf96478db814f2e7c881023d6cb4fce5f9
Parent
3ae1390f1792683…
2 files changed
+8
-1
+1
+8
-1
| --- src/graph.js | ||
| +++ src/graph.js | ||
| @@ -956,10 +956,11 @@ | ||
| 956 | 956 | kFRST = mSHIFT | 78 /* SHIFT+N */, |
| 957 | 957 | kNEXT = 78 /* N */, |
| 958 | 958 | kPREV = 77 /* M */, |
| 959 | 959 | kLAST = mSHIFT | 77 /* SHIFT+M */, |
| 960 | 960 | kCYCL = 72 /* H */, |
| 961 | + kSCRL = mSHIFT | 72 /* H */, | |
| 961 | 962 | kTICK = 188 /* , */, |
| 962 | 963 | kUNTK = mSHIFT | 188 /* , */, |
| 963 | 964 | kCPYH = 66 /* B */, |
| 964 | 965 | kCPYB = mSHIFT | 66 /* SHIFT+B */, |
| 965 | 966 | kTMLN = 74 /* J */, |
| @@ -973,10 +974,11 @@ | ||
| 973 | 974 | case kFRST: dx = -2; break; |
| 974 | 975 | case kNEXT: dx = -1; break; |
| 975 | 976 | case kPREV: dx = +1; break; |
| 976 | 977 | case kLAST: dx = +2; break; |
| 977 | 978 | case kCYCL: |
| 979 | + case kSCRL: | |
| 978 | 980 | case kTICK: |
| 979 | 981 | case kUNTK: |
| 980 | 982 | case kCPYH: |
| 981 | 983 | case kCPYB: |
| 982 | 984 | case kTMLN: |
| @@ -983,11 +985,16 @@ | ||
| 983 | 985 | case kTMLB: |
| 984 | 986 | case kVIEW: |
| 985 | 987 | case kDONE: break; |
| 986 | 988 | default: return; |
| 987 | 989 | } |
| 988 | - if( key==kUNTK ){ | |
| 990 | + if( key==kSCRL ){ | |
| 991 | + var td = document.querySelector('.timelineFocused'); | |
| 992 | + if( td ) focusScrollToIntoViewTheFossilWay(td); | |
| 993 | + return; | |
| 994 | + } | |
| 995 | + else if( key==kUNTK ){ | |
| 989 | 996 | var tid = focusTickedId(); |
| 990 | 997 | if( tid ){ |
| 991 | 998 | var gn = document.getElementById('tln'+tid.slice(1)); |
| 992 | 999 | if( gn ) gn.click(); |
| 993 | 1000 | } |
| 994 | 1001 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -956,10 +956,11 @@ | |
| 956 | kFRST = mSHIFT | 78 /* SHIFT+N */, |
| 957 | kNEXT = 78 /* N */, |
| 958 | kPREV = 77 /* M */, |
| 959 | kLAST = mSHIFT | 77 /* SHIFT+M */, |
| 960 | kCYCL = 72 /* H */, |
| 961 | kTICK = 188 /* , */, |
| 962 | kUNTK = mSHIFT | 188 /* , */, |
| 963 | kCPYH = 66 /* B */, |
| 964 | kCPYB = mSHIFT | 66 /* SHIFT+B */, |
| 965 | kTMLN = 74 /* J */, |
| @@ -973,10 +974,11 @@ | |
| 973 | case kFRST: dx = -2; break; |
| 974 | case kNEXT: dx = -1; break; |
| 975 | case kPREV: dx = +1; break; |
| 976 | case kLAST: dx = +2; break; |
| 977 | case kCYCL: |
| 978 | case kTICK: |
| 979 | case kUNTK: |
| 980 | case kCPYH: |
| 981 | case kCPYB: |
| 982 | case kTMLN: |
| @@ -983,11 +985,16 @@ | |
| 983 | case kTMLB: |
| 984 | case kVIEW: |
| 985 | case kDONE: break; |
| 986 | default: return; |
| 987 | } |
| 988 | if( key==kUNTK ){ |
| 989 | var tid = focusTickedId(); |
| 990 | if( tid ){ |
| 991 | var gn = document.getElementById('tln'+tid.slice(1)); |
| 992 | if( gn ) gn.click(); |
| 993 | } |
| 994 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -956,10 +956,11 @@ | |
| 956 | kFRST = mSHIFT | 78 /* SHIFT+N */, |
| 957 | kNEXT = 78 /* N */, |
| 958 | kPREV = 77 /* M */, |
| 959 | kLAST = mSHIFT | 77 /* SHIFT+M */, |
| 960 | kCYCL = 72 /* H */, |
| 961 | kSCRL = mSHIFT | 72 /* H */, |
| 962 | kTICK = 188 /* , */, |
| 963 | kUNTK = mSHIFT | 188 /* , */, |
| 964 | kCPYH = 66 /* B */, |
| 965 | kCPYB = mSHIFT | 66 /* SHIFT+B */, |
| 966 | kTMLN = 74 /* J */, |
| @@ -973,10 +974,11 @@ | |
| 974 | case kFRST: dx = -2; break; |
| 975 | case kNEXT: dx = -1; break; |
| 976 | case kPREV: dx = +1; break; |
| 977 | case kLAST: dx = +2; break; |
| 978 | case kCYCL: |
| 979 | case kSCRL: |
| 980 | case kTICK: |
| 981 | case kUNTK: |
| 982 | case kCPYH: |
| 983 | case kCPYB: |
| 984 | case kTMLN: |
| @@ -983,11 +985,16 @@ | |
| 985 | case kTMLB: |
| 986 | case kVIEW: |
| 987 | case kDONE: break; |
| 988 | default: return; |
| 989 | } |
| 990 | if( key==kSCRL ){ |
| 991 | var td = document.querySelector('.timelineFocused'); |
| 992 | if( td ) focusScrollToIntoViewTheFossilWay(td); |
| 993 | return; |
| 994 | } |
| 995 | else if( key==kUNTK ){ |
| 996 | var tid = focusTickedId(); |
| 997 | if( tid ){ |
| 998 | var gn = document.getElementById('tln'+tid.slice(1)); |
| 999 | if( gn ) gn.click(); |
| 1000 | } |
| 1001 |
+1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1635,10 +1635,11 @@ | ||
| 1635 | 1635 | ** N Focus first (newest) entry. |
| 1636 | 1636 | ** n Focus next (newer) entry, or open next page. |
| 1637 | 1637 | ** m Focus previous (older) entry, or open previous page. |
| 1638 | 1638 | ** M Focus last (oldest) entry. |
| 1639 | 1639 | ** h Move focus between selected, current (check-out) and ticked entries. |
| 1640 | +** H Scroll to focused entry. | |
| 1640 | 1641 | ** , Tick/untick the node of the focused entry. |
| 1641 | 1642 | ** ; Untick the nodes of all entries. |
| 1642 | 1643 | ** b Copy the commit hash of the focused entry to clipboard. |
| 1643 | 1644 | ** B Copy the branch name of the focused entry to clipboard. |
| 1644 | 1645 | ** j View timeline of focused entry. |
| 1645 | 1646 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1635,10 +1635,11 @@ | |
| 1635 | ** N Focus first (newest) entry. |
| 1636 | ** n Focus next (newer) entry, or open next page. |
| 1637 | ** m Focus previous (older) entry, or open previous page. |
| 1638 | ** M Focus last (oldest) entry. |
| 1639 | ** h Move focus between selected, current (check-out) and ticked entries. |
| 1640 | ** , Tick/untick the node of the focused entry. |
| 1641 | ** ; Untick the nodes of all entries. |
| 1642 | ** b Copy the commit hash of the focused entry to clipboard. |
| 1643 | ** B Copy the branch name of the focused entry to clipboard. |
| 1644 | ** j View timeline of focused entry. |
| 1645 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1635,10 +1635,11 @@ | |
| 1635 | ** N Focus first (newest) entry. |
| 1636 | ** n Focus next (newer) entry, or open next page. |
| 1637 | ** m Focus previous (older) entry, or open previous page. |
| 1638 | ** M Focus last (oldest) entry. |
| 1639 | ** h Move focus between selected, current (check-out) and ticked entries. |
| 1640 | ** H Scroll to focused entry. |
| 1641 | ** , Tick/untick the node of the focused entry. |
| 1642 | ** ; Untick the nodes of all entries. |
| 1643 | ** b Copy the commit hash of the focused entry to clipboard. |
| 1644 | ** B Copy the branch name of the focused entry to clipboard. |
| 1645 | ** j View timeline of focused entry. |
| 1646 |