aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-curses.h
AgeCommit message (Collapse)AuthorFilesLines
2015-03-18fixed compiling on G++ v4.4: It needs a more verbose syntax when calling ↵Robin Haberkorn1-2/+1
template base class constructors * v4.4 is still officially supported by SciTECO (see INSTALL) * Ubuntu Lucid appears to use v4.4 by default and lucid is till supported by PPA. So this should fix building SciTECO in its PPA for Ubuntu Lucid.
2015-03-16also set window title on ncurses, by querying terminfo capabilitiesRobin Haberkorn1-0/+2
2015-03-12improved ncurses batch mode initializationRobin Haberkorn1-1/+3
* I now understand better why the old initialization worked ;-) By not calling initscr(), we could prevent some terminal setup and screen clearing usually performed which would interfere with with having a clean stdout stream. However the Curses screen was still basically attached to the terminal. * That's why there was screen flickering in urxvt when calling sciteco (even in batch mode). Also that's why calling batch-mode SciTECO did not work from other Curses programs (including SciTECO). * The new implementation directs Curses at /dev/null, so it will completely stay away from /dev/tty. * /dev/tty is associated with the Curses screen only when the interactive mode is initialized. This works elegantly via freopen() - there's no need to create a new Curses screen. * This does currently not work on PDCurses where the batch mode will still initscr() followed by endwin(). I should investigate how newterm() behaves there - especially on Windows.
2015-03-03fixed double-free in Curses viewsRobin Haberkorn1-3/+6
* the Curses window associated with a Scinterm Scintilla view is INDEED deleted automatically by scintilla_delete() * The Scinterm documentation is WRONG on this. * This has been broken in the SciTECO code for a long time. Perhaps, for some obscure reason, this does not cause any problems on NCurses. It results in instant segfaults on MinGW/PDCurses though.
2015-03-01keep rubbed out command line for later re-insertion and massive Cmdline ↵Robin Haberkorn1-5/+13
cleanup/refactoring * characters rubbed out are not totally removed from the command line, but only from the *effective* command line. * The rubbed out command line is displayed after the command line cursor. On Curses it is grey and underlined. * When characters are inserted that are on the rubbed out part of the command line, the cursor simply moves forward. NOTE: There's currently no immediate editing command for reinserting the next character/word from the rubbed out command line. * Characters resulting in errors are no longer simply discarded but rubbed out, so they will stay in the rubbed out part of the command line, reminding you which character caused the error. * Improved Cmdline formatting on Curses UI: * Asterisk is printed bold * Control characters are printed in REVERSE style, similar to what Scinterm does. The controll character formatting has thus been moved from macro_echo() in cmdline.cpp to the UI implementations. * Updated the GTK+ UI (UNTESTED): I did only, the most important API adaptions. The command line still does not use any colors. * Refactored entire command line handling: * The command line is now a class (Cmdline), and most functions in cmdline.cpp have been converted to methods. * Esp. process_edit_cmd() (now Cmdline::process_edit_cmd()) has been simplified. There is no longer the possibility of a buffer overflow because of static insertion buffer sizes * Cleaned up usage of the cmdline_pos variable (now Cmdline::pc) which is really a program counter that used a different origin as macro_pc which was really confusing. * The new Cmdline class is theoretically 8-bit clean. However all of this will change again when we introduce Scintilla views for the command line. * Added 8-bit clean (null-byte aware) versions of QRegisterData::set_string() and QRegisterData::append_string()
2015-02-11updated copyright to 2015Robin Haberkorn1-1/+1
2014-12-09Curses: support cycling through long lists of possible auto-completions and ↵Robin Haberkorn1-4/+15
optimized screen refreshing/redrawing * pressing e.g. TAB when the popup is showing a list of auto-completions will show the next page, eventually beginning at the first one again. * do not redraw curses windows in the UI methods directly. this resulted in flickering during command-line editing macros and ordinary macro calls because the physical screen was updated immediately. Instead, window refreshing and updated is done centrally in event_loop_iter() only after a key has been processed. Also we use wnoutrefresh() and doupdate() to send as little to the terminal (emulator) as possible.
2014-11-17renamed the "NCurses" UI to "Curses" internallyRobin Haberkorn1-0/+141
* does not change ./configure parameters You still have to specifiy --with-interface=ncurses for the Curses interface with default settings * the "NCurses" UI was used for many different Curses variants, so plain "Curses" is a better name.