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
/**************************************************************************
* 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) *
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,
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();