Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 156292
Collapse All | Expand All

(-)lib/readline/display.c.orig (-1 / +27 lines)
Lines 1598-1605 Link Here
1598
	  temp = nls - nfd;
1598
	  temp = nls - nfd;
1599
	  if (temp > 0)
1599
	  if (temp > 0)
1600
	    {
1600
	    {
1601
	      /* If nfd begins at the prompt, or before the invisible
1602
		 characters in the prompt, we need to adjust _rl_last_c_pos
1603
		 in a multibyte locale to account for the wrap offset and
1604
		 set cpos_adjusted accordingly. */
1601
	      _rl_output_some_chars (nfd, temp);
1605
	      _rl_output_some_chars (nfd, temp);
1602
	      _rl_last_c_pos += _rl_col_width (nfd, 0, temp);;
1606
	      if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
1607
		{
1608
                  _rl_last_c_pos += _rl_col_width (nfd, 0, temp);
1609
                  if (current_line == 0 && wrap_offset &&  ((nfd - new) <= prompt_last_invisible))
1610
		    {
1611
		      _rl_last_c_pos -= wrap_offset;
1612
		      cpos_adjusted = 1;
1613
		    }
1614
		}
1615
              else
1616
                _rl_last_c_pos += temp;
1603
	    }
1617
	    }
1604
	}
1618
	}
1605
      /* Otherwise, print over the existing material. */
1619
      /* Otherwise, print over the existing material. */
Lines 1607-1614 Link Here
1607
	{
1621
	{
1608
	  if (temp > 0)
1622
	  if (temp > 0)
1609
	    {
1623
	    {
1624
	      /* If nfd begins at the prompt, or before the invisible
1625
		 characters in the prompt, we need to adjust _rl_last_c_pos
1626
		 in a multibyte locale to account for the wrap offset and
1627
		 set cpos_adjusted accordingly. */
1610
	      _rl_output_some_chars (nfd, temp);
1628
	      _rl_output_some_chars (nfd, temp);
1611
	      _rl_last_c_pos += col_temp;		/* XXX */
1629
	      _rl_last_c_pos += col_temp;		/* XXX */
1630
	      if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
1631
		{
1632
		  if (current_line == 0 && wrap_offset &&  ((nfd - new) <= prompt_last_invisible))
1633
		    {
1634
		      _rl_last_c_pos -= wrap_offset;
1635
		      cpos_adjusted = 1;
1636
		    }
1637
		}
1612
	    }
1638
	    }
1613
	  lendiff = (oe - old) - (ne - new);
1639
	  lendiff = (oe - old) - (ne - new);
1614
	  if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
1640
	  if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)

Return to bug 156292