Changeset 16868


Ignore:
Timestamp:
06/19/13 13:14:57 (11 years ago)
Author:
tbretz
Message:
Added 'home' and 'end' key to fixed key bindings, this makes it work in screen. Updated the EventHook again. This version still gives some flicker on my laptop, but it works on La Palma and at least the line buffer doesn't jump.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Readline.cc

    r16862 r16868  
    141141
    142142    // Bind delete, page up, page down
     143    rl_bind_keyseq("\e[1~",  rl_named_function("beginning-of-line"));
    143144    rl_bind_keyseq("\e[3~",  rl_named_function("delete-char"));
     145    rl_bind_keyseq("\e[4~",  rl_named_function("end-of-line"));
    144146    rl_bind_keyseq("\e[5~",  rl_named_function("history-search-backward"));
    145147    rl_bind_keyseq("\e[6~",  rl_named_function("history-search-forward"));
     
    322324    if (p.empty())
    323325        p = rl_prompt;
     326
     327    const string line_buffer = rl_line_buffer;
     328    const int    point       = rl_point;
     329
     330    rl_replace_line("", 1);
     331    UpdatePrompt("");
     332    Redisplay();
     333
     334    rl_replace_line(line_buffer.c_str(), 1);
     335    rl_point = point;
    324336
    325337    UpdatePrompt(p);
Note: See TracChangeset for help on using the changeset viewer.