tcl-hacks

Check-in [186f8b8e1f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fix cursor leave after redraw-following (using tty::save, which sucks a little bit)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:186f8b8e1ff5aaa460ad047adab29241d39bf5de
User & Date: aspect 2018-05-17 15:18:20
Context
2018-05-18
14:41
more tidy and random bugfix. This is a bit tedious to test. Gotta keep the code simple. check-in: 80a8ae19bc user: aspect tags: trunk
2018-05-17
15:18
fix cursor leave after redraw-following (using tty::save, which sucks a little bit) check-in: 186f8b8e1f user: aspect tags: trunk
15:16
put getline in a namespace check-in: ec40ff26f2 user: aspect tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to getline/getline.tcl.

158
159
160
161
162
163
164

165
166
167

168
169
170
171
172
173
174
            my goto $pos
        }
        method redraw-following {} {
            set pos [input pos]
            lset Lines $Lineidx [input get]
            set idx $Lineidx
            while {![my is-last-line]} { my next-line }

            output emit \n      ;# tty::down won't force a scroll
            output emit [tty::erase-line]
            output emit [tty::up]

            while {$Lineidx > $idx}   { my prior-line }
            my goto $pos
        }

        method insert {s} {
            foreach c [split $s ""] {
                if {$c eq "\n"} {







>
|

|
>







158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
            my goto $pos
        }
        method redraw-following {} {
            set pos [input pos]
            lset Lines $Lineidx [input get]
            set idx $Lineidx
            while {![my is-last-line]} { my next-line }
            output emit [tty::save]         ;# ugh
            output emit \n                  ;# tty::down won't force a scroll
            output emit [tty::erase-line]
            #output emit [tty::up]
            output emit [tty::restore]
            while {$Lineidx > $idx}   { my prior-line }
            my goto $pos
        }

        method insert {s} {
            foreach c [split $s ""] {
                if {$c eq "\n"} {