source: patches/readline-6.0-branch_update-2.patch@ 7816bd1

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 7816bd1 was 25e84be, checked in by Jonathan Norman <nate@…>, 15 years ago

updated readline patch to -2

  • Property mode set to 100644
File size: 4.3 KB
  • readline-6.0

    Submitted By: Jonathan Norman (jonathan at bluesquarelinux.co.uk)
    Date: 2009-12-31 
    Initial Package Version: 6.0 
    Origin: Upstream
    Upstream Status: Applied
    Description: Contains all upstream patches up to 6.0-004
    
    diff -Naur readline-6.0.orig/display.c readline-6.0/display.c
    old new  
    512512  /* Block keyboard interrupts because this function manipulates global
    513513     data structures. */
    514514  _rl_block_sigint (); 
     515  RL_SETSTATE (RL_STATE_REDISPLAYING);
    515516
    516517  if (!rl_display_prompt)
    517518    rl_display_prompt = "";
     
    11911192      if (!rl_display_fixed || forced_display || lmargin != last_lmargin)
    11921193        {
    11931194          forced_display = 0;
     1195          o_cpos = _rl_last_c_pos;
     1196          cpos_adjusted = 0;
    11941197          update_line (&visible_line[last_lmargin],
    11951198                       &invisible_line[lmargin],
    11961199                       0,
     
    11981201                       _rl_screenwidth + (lmargin ? 0 : wrap_offset),
    11991202                       0);
    12001203
     1204          if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
     1205              cpos_adjusted == 0 &&
     1206              _rl_last_c_pos != o_cpos &&
     1207              _rl_last_c_pos > wrap_offset &&
     1208              o_cpos < prompt_last_invisible)
     1209                _rl_last_c_pos -= prompt_invis_chars_first_line;        /* XXX - was wrap_offset */
     1210
    12011211          /* If the visible new line is shorter than the old, but the number
    12021212             of invisible characters is greater, and we are at the end of
    12031213             the new line, we need to clear to eol. */
     
    12361246      visible_wrap_offset = wrap_offset;
    12371247  }
    12381248
     1249  RL_UNSETSTATE (RL_STATE_REDISPLAYING);
    12391250  _rl_release_sigint ();
    12401251}
    12411252
     
    17721783             space_to_eol will insert too many spaces.  XXX - maybe we should
    17731784             adjust col_lendiff based on the difference between _rl_last_c_pos
    17741785             and _rl_screenwidth */
    1775           if (col_lendiff && (_rl_last_c_pos < _rl_screenwidth))
     1786          if (col_lendiff && ((MB_CUR_MAX == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth)))
    17761787#endif
    17771788            {     
    17781789              if (_rl_term_autowrap && current_line < inv_botlin)
     
    18921903
    18931904  woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
    18941905  cpos = _rl_last_c_pos;
     1906
     1907  if (cpos == 0 && cpos == new)
     1908    return;
     1909
    18951910#if defined (HANDLE_MULTIBYTE)
    18961911  /* If we have multibyte characters, NEW is indexed by the buffer point in
    18971912     a multibyte string, but _rl_last_c_pos is the display position.  In
     
    19051920         prompt string, since they're both buffer indices and DPOS is a
    19061921         desired display position. */
    19071922      if ((new > prompt_last_invisible) ||              /* XXX - don't use woff here */
    1908           (prompt_physical_chars > _rl_screenwidth &&
     1923          (prompt_physical_chars >= _rl_screenwidth &&
    19091924           _rl_last_v_pos == prompt_last_screen_line &&
    1910            wrap_offset >= woff &&
     1925           wrap_offset >= woff && dpos >= woff &&
    19111926           new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))
    19121927           /* XXX last comparison might need to be >= */
    19131928        {
  • readline-6.0

    diff -Naur readline-6.0.orig/patchlevel readline-6.0/patchlevel
    old new  
    11# Do not edit -- exists only for use by patch
    22
    3 0
     33
  • readline-6.0

    diff -Naur readline-6.0.orig/readline.h readline-6.0/readline.h
    old new  
    814814#define RL_STATE_VIMOTION       0x100000        /* reading vi motion arg */
    815815#define RL_STATE_MULTIKEY       0x200000        /* reading multiple-key command */
    816816#define RL_STATE_VICMDONCE      0x400000        /* entered vi command mode at least once */
     817#define RL_STATE_REDISPLAYING   0x800000        /* updating terminal display */
    817818
    818 #define RL_STATE_DONE           0x800000        /* done; accepted line */
     819#define RL_STATE_DONE           0x1000000       /* done; accepted line */
    819820
    820821#define RL_SETSTATE(x)          (rl_readline_state |= (x))
    821822#define RL_UNSETSTATE(x)        (rl_readline_state &= ~(x))
  • readline-6.0

    diff -Naur readline-6.0.orig/terminal.c readline-6.0/terminal.c
    old new  
    355355      _rl_get_screen_size (fileno (rl_instream), 1);
    356356      if (CUSTOM_REDISPLAY_FUNC ())
    357357        rl_forced_update_display ();
    358       else
     358      else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0)
    359359        _rl_redisplay_after_sigwinch ();
    360360    }
    361361}
Note: See TracBrowser for help on using the repository browser.