Skip to content

Control-a works poorly #7

@AlanGrunwald

Description

@AlanGrunwald

After downloading the latest sources, I noticed that typing ctrl-a in the console reset the cursor to the start of the prompt, rather than following the space at the end.

I searched through various tkcon sources that I have accumulated from heaven knows where and found one that fixes this:

bind TkConsole <Control-a> {
if {[%W compare {limit linestart} == {insert linestart}]} {
    tk::TextSetCursor %W limit
} else {
    tk::TextSetCursor %W {insert linestart}
}
}
bind TkConsole <Key-Home> [bind TkConsole <Control-a>]
bind TkConsole <Key-KP_Home> [bind TkConsole <Control-a>]

I think I can see what this is doing, but I can't claim that I actually understand it. I've been using a version of tkcon.tcl that includes this on and off for the past three weeks without problem. Please find attached a patch.

Alan

tkcon-2.9a1.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions