Browse Source

update overtype

master
Julian Noble 4 months ago
parent
commit
9b07e4c07b
  1. 24
      src/vendormodules/overtype-1.6.2.tm
  2. 3655
      src/vendormodules/overtype-1.6.3.tm

24
src/vendormodules/overtype-1.6.2.tm

@ -480,7 +480,21 @@ namespace eval overtype {
#review insert_mode. As an 'overtype' function whose main function is not interactive keystrokes - insert is secondary -
#but even if we didn't want it as an option to the function call - to process ansi adequately we need to support IRM (insertion-replacement mode) ESC [ 4 h|l
set LASTCALL [list -info 1 -insert_mode $insert_mode -autowrap_mode $autowrap_mode -transparent $opt_transparent -width $colwidth -exposed1 $opt_exposed1 -exposed2 $opt_exposed2 -overflow $opt_overflow -cursor_column $col -cursor_row $row $undertext $overtext]
set rinfo [renderline -experimental $opt_experimental -info 1 -insert_mode $insert_mode -cursor_restore_attributes $cursor_saved_attributes -autowrap_mode $autowrap_mode -transparent $opt_transparent -width $colwidth -exposed1 $opt_exposed1 -exposed2 $opt_exposed2 -overflow $opt_overflow -cursor_column $col -cursor_row $row $undertext $overtext]
set rinfo [renderline -experimental $opt_experimental\
-info 1\
-insert_mode $insert_mode\
-cursor_restore_attributes $cursor_saved_attributes\
-autowrap_mode $autowrap_mode\
-transparent $opt_transparent\
-width $colwidth\
-exposed1 $opt_exposed1\
-exposed2 $opt_exposed2\
-overflow $opt_overflow\
-cursor_column $col\
-cursor_row $row\
$undertext\
$overtext\
]
set instruction [dict get $rinfo instruction]
set insert_mode [dict get $rinfo insert_mode]
set autowrap_mode [dict get $rinfo autowrap_mode] ;#
@ -1018,7 +1032,7 @@ namespace eval overtype {
set show_ellipsis 0
}
#set lostdata [string range $overtext end-[expr {$overflowlength-1}] end]
if {[string trim [ansistrip $lostdata]] eq ""} {
if {[string trim [punk::ansi::stripansi $lostdata]] eq ""} {
set show_ellipsis 0
}
}
@ -1246,6 +1260,10 @@ namespace eval overtype {
return [join $outputlines \n]
}
#overtype::right is for a rendered ragged underblock and a rendered ragged overblock
#ie we can determine the block width for bost by examining the lines and picking the longest.
#
#todo - rename overtype::left - which has morphed in capability and usage so that it bears less resemblance to overtype::right and overtype::centre
proc right {args} {
#NOT the same as align-right - which should be done to the overblock first if required
variable default_ellipsis_horizontal
@ -1794,6 +1812,8 @@ namespace eval overtype {
#experiment
set overlay_grapheme_control_stacks [list]
foreach {pt code} $overmap {
#todo - wrap in test for empty pt (we used split_codes_single - and it may be common for sgr sequences to be unmerged and so have empty pts between)
if {$cp437_glyphs} {
set pt [string map $cp437_map $pt]
}

3655
src/vendormodules/overtype-1.6.3.tm

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save