aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-06-24disable all Scintilla margins by defaultRobin Haberkorn1-0/+6
* it makes little sense to keep Scintilla's default for new views which gives margin 1 (non-folding symbols) a fixed width of 16 pixels. The interpretation of this width is UI-dependant. * it is more consistent to disable all margins initially. this is also the minimalist setup shown when you run e.g. with --no-profile. * the default look of SciTECO will be more like classic TECOs. This is also what has been requested in #4. * sample.teco_ini does no longer have to disable margin 1 explicitly
2015-06-24fixed SEGFAULTs in InterfaceCurses::vmsg()Robin Haberkorn1-0/+8
* both vmsg() and stdio_msg() behave like vprintf() are allowed to leave their `va_list` in an undefined state. * therefore when writing messages to stdio in addition to the message line, we have to copy the argument list. * fixes SEGFAULTs when trying to log any message (but this bug did not manifest on every test system)
2015-06-23fixed stdio message printing for strings longer than 255 charactersRobin Haberkorn1-7/+9
* there's no reason for formatting into a buffer of fixed length first, since all that is done to the format string is adding a prefix and suffix (line feed). * the new implementation should also be slightly faster.
2015-06-23the Scintilla caret should be non-blinking by defaultRobin Haberkorn1-0/+1
* now both Curses and GTK UIs start with a non-blinking block caret
2015-06-23never show the horizontal scrollbar by defaultRobin Haberkorn1-0/+7
* the GTK UI shows the horizontal scrollbar by default, while Scinterm doesn't. Since showing them with Scintilla's default settings is ugly but setting them up properly is costly and should be decided by the user.
2015-02-11updated copyright to 2015Robin Haberkorn1-1/+1
2014-11-24turn off Scintilla undo collection by default and fixed memleakRobin Haberkorn1-0/+6
* in batch mode, Scintilla undo actions are simply leaked memory * Since we have more than one Scintilla view now, we must empty the undo buffer of all scintilla views when a command line is committed ($$)
2014-11-17Make sure QRegister::view is properly initialized and cleaned upRobin Haberkorn1-1/+1
* it must be initialized after the UI (Interface::main), so I added a View::initialize() function * the old initialize() method was renamed to setup() * use a global instance of QRegister::view so it is guaranteed to be destroyed only after any QRegisters that could still need it * Document API adapted to work with ViewCurrent references
2014-11-16rewritten View and Interface base classes using the Curiously Recurring ↵Robin Haberkorn1-5/+22
Template Pattern. * without the one-view-per-buffer designs, many Scintilla send message (SSM) calls could be inlined * with the new design, this was no longer possible using the abstract base classes. the CRT pattern allows inlining again but introduces a strange level of code obscurity. * tests suggest that at high optimization levels, the one-view-per-buffer design and the CRT pattern reduces typical macro runtimes by 30% (e.g. for symbols-extract.tes). * only updated the NCurses UI for the time being
2014-11-16first working version of the one-view-per-buffer designRobin Haberkorn1-0/+114
The user interface provides a Scintilla view abstraction and every buffer is based on a view. All Q-Register strings use a single dedicated view to save memory and initialization time when using many string registers. * this means we can finally implement a working lexer configuration and it only has to be done once when the buffer is first added to the ring. It is unnecessary to magically restore the lexer styles upon rubout of EB (very hard to implement anyway). It is also not necessary to rerun the lexer configuration macro upon rubout which would be hard to reconcile with SciTECO's basic design since every side-effect should be attached to a character. * this means that opening buffers is slightly slower now because of the view initialization * on the other hand, macros with many string q-reg operations are faster now, since the document must no longer be changed on the buffer's view and restored later on. * also now we can make a difference between editing a document in a view and changing the current view, which reduces UI calls * the Document class has been retained as an abstraction about Scintilla documents, used by QRegister Strings. It had to be made virtual, so the view on which the document is created can be specified by a virtual function. There is no additional space overhead for Documents.