Ticket #1801: 0004-don-t-allow-cursor-to-wrap-at-BOL-in-cursor_beyond_e.patch

File 0004-don-t-allow-cursor-to-wrap-at-BOL-in-cursor_beyond_e.patch, 928 bytes (added by ossi, 5 years ago)

rebased fix

  • src/editor/edit.c

    From c1dd71a165c0465f2ec26bdc0c61c1677d24111b Mon Sep 17 00:00:00 2001
    From: Oswald Buddenhagen <ossi@kde.org>
    Date: Thu, 8 Apr 2010 00:58:10 +0200
    Subject: [PATCH 04/11] don't allow cursor to wrap at BOL in cursor_beyond_eol
     mode
    
    ---
     src/editor/edit.c | 9 +++++++--
     1 file changed, 7 insertions(+), 2 deletions(-)
    
    diff --git a/src/editor/edit.c b/src/editor/edit.c
    index 66a97fe..88f7fda 100644
    a b edit_left_char_move_cmd (WEdit * edit) 
    996996    } 
    997997#endif 
    998998 
    999     if (option_cursor_beyond_eol && edit->over_col > 0) 
    1000         edit->over_col--; 
     999    if (option_cursor_beyond_eol) 
     1000    { 
     1001        if (edit->over_col > 0) 
     1002            edit->over_col--; 
     1003        else if (edit->buffer.curs1 != edit_buffer_get_bol (&edit->buffer, edit->buffer.curs1)) 
     1004            edit_cursor_move (edit, -cw); 
     1005    } 
    10011006    else 
    10021007        edit_cursor_move (edit, -cw); 
    10031008}