Fossil SCM

Fix horizontal scrolling in the merge UI.

drh 2024-12-05 18:56 better-merge
Commit 06df966b19d19ea0199579d0fddc78ccf439f7f885804dd9e59861960e9a29a2
1 file changed +1 -11
+1 -11
--- src/merge.tcl
+++ src/merge.tcl
@@ -277,20 +277,10 @@
277277
proc disableSync {axis} {
278278
rename sync-$axis _sync-$axis
279279
interp alias {} sync-$axis {} noop
280280
}
281281
282
-proc sync-x {col first last} {
283
- disableSync x
284
- $col xview moveto [expr {$first*[xvis $col]/($last-$first)}]
285
- foreach side {A B C D} {
286
- set sb .sbx$side
287
- set xview [.txt$side xview]
288
- }
289
- enableSync x
290
-}
291
-
292282
proc sync-y {first last} {
293283
disableSync y
294284
foreach c [cols] {
295285
$c yview moveto $first
296286
}
@@ -453,11 +443,11 @@
453443
text $ln
454444
$ln tag config - -justify right
455445
456446
set txt .txt$side
457447
text $txt -width $CFG(WIDTH) -height $CFG(HEIGHT) -wrap none \
458
- -xscroll "sync-x $syncCol"
448
+ -xscroll ".sbx$side set"
459449
catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5
460450
foreach tag {add rm chng} {
461451
$txt tag config $tag -background $CFG([string toupper $tag]_BG)
462452
$txt tag lower $tag
463453
}
464454
--- src/merge.tcl
+++ src/merge.tcl
@@ -277,20 +277,10 @@
277 proc disableSync {axis} {
278 rename sync-$axis _sync-$axis
279 interp alias {} sync-$axis {} noop
280 }
281
282 proc sync-x {col first last} {
283 disableSync x
284 $col xview moveto [expr {$first*[xvis $col]/($last-$first)}]
285 foreach side {A B C D} {
286 set sb .sbx$side
287 set xview [.txt$side xview]
288 }
289 enableSync x
290 }
291
292 proc sync-y {first last} {
293 disableSync y
294 foreach c [cols] {
295 $c yview moveto $first
296 }
@@ -453,11 +443,11 @@
453 text $ln
454 $ln tag config - -justify right
455
456 set txt .txt$side
457 text $txt -width $CFG(WIDTH) -height $CFG(HEIGHT) -wrap none \
458 -xscroll "sync-x $syncCol"
459 catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5
460 foreach tag {add rm chng} {
461 $txt tag config $tag -background $CFG([string toupper $tag]_BG)
462 $txt tag lower $tag
463 }
464
--- src/merge.tcl
+++ src/merge.tcl
@@ -277,20 +277,10 @@
277 proc disableSync {axis} {
278 rename sync-$axis _sync-$axis
279 interp alias {} sync-$axis {} noop
280 }
281
 
 
 
 
 
 
 
 
 
 
282 proc sync-y {first last} {
283 disableSync y
284 foreach c [cols] {
285 $c yview moveto $first
286 }
@@ -453,11 +443,11 @@
443 text $ln
444 $ln tag config - -justify right
445
446 set txt .txt$side
447 text $txt -width $CFG(WIDTH) -height $CFG(HEIGHT) -wrap none \
448 -xscroll ".sbx$side set"
449 catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5
450 foreach tag {add rm chng} {
451 $txt tag config $tag -background $CFG([string toupper $tag]_BG)
452 $txt tag lower $tag
453 }
454

Keyboard Shortcuts

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