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
|
rename open_pipe() execute_command(), and remove
|
||||||
execute_command(). (DLR)
|
execute_command(). (DLR)
|
||||||
- Replace almost all mvwaddstr(hblank) calls with mvwhline(' ',
|
- Replace almost all mvwaddstr(hblank) calls with mvwhline(' ',
|
||||||
COLS) calls, which do the same thing. Changes to
|
COLS) calls, which do the same thing. New function
|
||||||
do_browser(), blank_titlebar(), blank_topbar(), blank_edit(),
|
nmvwhline() (since slang doesn't define mvwhline()); changes
|
||||||
blank_statusbar(), blank_bottombars(), update_line(), and
|
to do_browser(), blank_titlebar(), blank_topbar(),
|
||||||
edit_refresh(). (DLR)
|
blank_edit(), blank_statusbar(), blank_bottombars(),
|
||||||
|
update_line(), and edit_refresh(). (DLR)
|
||||||
- files.c:
|
- files.c:
|
||||||
open_file()
|
open_file()
|
||||||
- Assert that filename isn't NULL, and don't do anything special
|
- Assert that filename isn't NULL, and don't do anything special
|
||||||
@ -82,6 +83,8 @@ CVS code -
|
|||||||
display_string()
|
display_string()
|
||||||
- Display invalid multibyte sequences as Unicode 0xFFFD
|
- Display invalid multibyte sequences as Unicode 0xFFFD
|
||||||
(Replacement Character). (DLR)
|
(Replacement Character). (DLR)
|
||||||
|
total_redraw()
|
||||||
|
- Rework to use functions that slang actually defines. (DLR)
|
||||||
- configure.ac:
|
- configure.ac:
|
||||||
- Since we only use vsnprintf() now, remove the tests for
|
- Since we only use vsnprintf() now, remove the tests for
|
||||||
snprintf(). (DLR)
|
snprintf(). (DLR)
|
||||||
|
@ -127,6 +127,12 @@
|
|||||||
#define getline ngetline
|
#define getline ngetline
|
||||||
#endif
|
#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
|
#define VERMSG "GNU nano " VERSION
|
||||||
|
|
||||||
/* If we aren't using ncurses, turn the mouse support off, as it's
|
/* 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);
|
*lines, size_t *size);
|
||||||
|
|
||||||
/* Public functions in winio.c. */
|
/* Public functions in winio.c. */
|
||||||
|
#ifdef USE_SLANG
|
||||||
|
int nmvwhline(WINDOW *win, int y, int x, char ch, int n);
|
||||||
|
#endif
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
void reset_kbinput(void);
|
void reset_kbinput(void);
|
||||||
#endif
|
#endif
|
||||||
|
23
src/winio.c
23
src/winio.c
@ -52,6 +52,19 @@ static bool resetstatuspos = FALSE;
|
|||||||
/* Should we reset the cursor position
|
/* Should we reset the cursor position
|
||||||
* at the statusbar prompt? */
|
* 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:
|
/* Control character compatibility:
|
||||||
*
|
*
|
||||||
* - NANO_BACKSPACE_KEY is Ctrl-H, which is Backspace under ASCII, ANSI,
|
* - 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)
|
void total_redraw(void)
|
||||||
{
|
{
|
||||||
#ifdef USE_SLANG
|
touchwin(stdscr);
|
||||||
/* Slang curses emulation brain damage, part 3: Slang doesn't define
|
wrefresh(stdscr);
|
||||||
* curscr. */
|
|
||||||
SLsmg_touch_screen();
|
|
||||||
SLsmg_refresh();
|
|
||||||
#else
|
|
||||||
wrefresh(curscr);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void total_refresh(void)
|
void total_refresh(void)
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user