work around slang brokenness
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2841 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
a0ebc813f1
Коммит
1d696c0047
11
ChangeLog
11
ChangeLog
@ -23,10 +23,11 @@ CVS code -
|
||||
rename open_pipe() execute_command(), and remove
|
||||
execute_command(). (DLR)
|
||||
- Replace almost all mvwaddstr(hblank) calls with mvwhline(' ',
|
||||
COLS) calls, which do the same thing. Changes to
|
||||
do_browser(), blank_titlebar(), blank_topbar(), blank_edit(),
|
||||
blank_statusbar(), blank_bottombars(), update_line(), and
|
||||
edit_refresh(). (DLR)
|
||||
COLS) calls, which do the same thing. New function
|
||||
nmvwhline() (since slang doesn't define mvwhline()); changes
|
||||
to do_browser(), blank_titlebar(), blank_topbar(),
|
||||
blank_edit(), blank_statusbar(), blank_bottombars(),
|
||||
update_line(), and edit_refresh(). (DLR)
|
||||
- files.c:
|
||||
open_file()
|
||||
- Assert that filename isn't NULL, and don't do anything special
|
||||
@ -82,6 +83,8 @@ CVS code -
|
||||
display_string()
|
||||
- Display invalid multibyte sequences as Unicode 0xFFFD
|
||||
(Replacement Character). (DLR)
|
||||
total_redraw()
|
||||
- Rework to use functions that slang actually defines. (DLR)
|
||||
- configure.ac:
|
||||
- Since we only use vsnprintf() now, remove the tests for
|
||||
snprintf(). (DLR)
|
||||
|
@ -127,6 +127,12 @@
|
||||
#define getline ngetline
|
||||
#endif
|
||||
|
||||
/* Slang curses emulation brain damage, part 3: Slang doesn't define
|
||||
* mvwhline(), so use the version we have. */
|
||||
#ifdef USE_SLANG
|
||||
#define mvwhline nmvwhline
|
||||
#endif
|
||||
|
||||
#define VERMSG "GNU nano " VERSION
|
||||
|
||||
/* If we aren't using ncurses, turn the mouse support off, as it's
|
||||
|
@ -567,6 +567,9 @@ void get_totals(const filestruct *begin, const filestruct *end, size_t
|
||||
*lines, size_t *size);
|
||||
|
||||
/* Public functions in winio.c. */
|
||||
#ifdef USE_SLANG
|
||||
int nmvwhline(WINDOW *win, int y, int x, char ch, int n);
|
||||
#endif
|
||||
#ifndef NANO_SMALL
|
||||
void reset_kbinput(void);
|
||||
#endif
|
||||
|
23
src/winio.c
23
src/winio.c
@ -52,6 +52,19 @@ static bool resetstatuspos = FALSE;
|
||||
/* Should we reset the cursor position
|
||||
* at the statusbar prompt? */
|
||||
|
||||
#ifdef USE_SLANG
|
||||
/* Slang curses emulation brain damage, part 4: Slang doesn't define
|
||||
* mvwhline(). */
|
||||
int nmvwhline(WINDOW *win, int y, int x, char ch, int n)
|
||||
{
|
||||
wmove(win, y, x);
|
||||
for (; n > 0; n--)
|
||||
waddch(win, ch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Control character compatibility:
|
||||
*
|
||||
* - NANO_BACKSPACE_KEY is Ctrl-H, which is Backspace under ASCII, ANSI,
|
||||
@ -3776,14 +3789,8 @@ int do_yesno(bool all, const char *msg)
|
||||
|
||||
void total_redraw(void)
|
||||
{
|
||||
#ifdef USE_SLANG
|
||||
/* Slang curses emulation brain damage, part 3: Slang doesn't define
|
||||
* curscr. */
|
||||
SLsmg_touch_screen();
|
||||
SLsmg_refresh();
|
||||
#else
|
||||
wrefresh(curscr);
|
||||
#endif
|
||||
touchwin(stdscr);
|
||||
wrefresh(stdscr);
|
||||
}
|
||||
|
||||
void total_refresh(void)
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user