mirror of git://git.sv.gnu.org/nano.git
fix an assert, update another copyright year, and add a few more of DB's
tweaks to fix a few minor bugs with UTF-8 display at the statusbar prompt git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2213 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
4840cb557f
commit
08cd7ef274
10
ChangeLog
10
ChangeLog
|
@ -70,11 +70,11 @@ CVS code -
|
|||
do_statusbar_backspace(), do_statusbar_delete(),
|
||||
do_statusbar_cut_text(), and do_statusbar_output(). (DLR)
|
||||
- Even more steps toward wide character/multibyte character
|
||||
support. Movement and (most) cursor display at the statusbar
|
||||
prompt should now work properly with a string containing
|
||||
multibyte characters, and text display of such strings should
|
||||
now (mostly) work properly as well. Changes to
|
||||
do_statusbar_right(), do_statusbar_left(),
|
||||
support. Movement and cursor display at the statusbar prompt
|
||||
should now work properly with a string containing multibyte
|
||||
characters, and text display of such strings should now work
|
||||
properly as well. Changes to search_init(),
|
||||
nanoget_repaint(), do_statusbar_right(), do_statusbar_left(),
|
||||
do_statusbar_backspace(), and do_statusbar_delete(). (David
|
||||
Benbennick and DLR)
|
||||
- Implement cutting from the current position to the end of the
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**************************************************************************
|
||||
* search.c *
|
||||
* *
|
||||
* Copyright (C) 2000-2004 Chris Allegretta *
|
||||
* Copyright (C) 2000-2005 Chris Allegretta *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
|
@ -152,7 +152,7 @@ int search_init(bool replacing, bool use_answer)
|
|||
if (last_search[0] != '\0') {
|
||||
char *disp = display_string(last_search, 0, COLS / 3, FALSE);
|
||||
|
||||
buf = charalloc(COLS / 3 + 7);
|
||||
buf = charalloc(strlen(disp) + 7);
|
||||
/* We use COLS / 3 here because we need to see more on the
|
||||
* line. */
|
||||
sprintf(buf, " [%s%s]", disp,
|
||||
|
|
|
@ -2329,9 +2329,9 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
|
|||
void nanoget_repaint(const char *buf, const char *inputbuf, size_t x)
|
||||
{
|
||||
size_t x_real = strnlenpt(inputbuf, x);
|
||||
int wid = COLS - strlen(buf) - 2;
|
||||
int wid = COLS - strlenpt(buf) - 2;
|
||||
|
||||
assert(0 <= x && x <= strlen(inputbuf));
|
||||
assert(x <= strlen(inputbuf));
|
||||
|
||||
wattron(bottomwin, A_REVERSE);
|
||||
blank_statusbar();
|
||||
|
|
Loading…
Reference in New Issue