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