aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2024-10-30testsuite: added --valgrind option for running SciTECO under Valgrind (memcheck)Robin Haberkorn3-3/+10
* Any memory error will let the test case fail with code 66. * You can also call make check TESTSUITEFLAGS="--valgrind" * There is no program test for Valgrind in configure.ac for the time being. `valgrind` must be in $PATH. * All CI testsuite runs under Ubuntu are now with Valgrind.
2024-10-29fixed <N> (search all) crashes before invocations of <S> (closes #26)Robin Haberkorn2-0/+8
* There was some boilerplate code missing in teco_state_search_all_initial(), that is present in teco_state_search_initial(). * Perhaps there should be a common function to avoid redundancies? * This will also fix the initialization of the string argument codepage for <N>.
2024-10-29updated TODORobin Haberkorn1-9/+17
2024-10-29PDCurses: filter out bogus double keypresses in combination with CTRL (refs #20)Robin Haberkorn1-0/+12
* Has been observed on PDCursesMod/WinGUI when pressing CTRL+Shift+6 on an US layout. I would expect code 30 (^^) to be inserted, instead PDCurses reports two keypresses (6^^). The first one is now filtered out since this will not be fixed upstream. See also https://github.com/Bill-Gray/PDCursesMod/issues/323 * Since AltGr on German layouts is reported as CTRL+ALT, we must be careful not to filter those out as well. * This is active on all PDCurses variants - who knows which other platforms will behave similarily. * You still cannot insert code 0 via CTRL+@ since PDCurses doesn't report it, but ncurses does not allow that either. This _could_ be synthesized by evaluating the modifier flags, though.
2024-10-29mingw-bundledlls: blacklist additional DLLsRobin Haberkorn1-2/+3
* I am not entirely sure whether it would be safe to bundle api-ms-win-core-synch-l1-2-0.dll or bcryptprimitives.dll, so I won't upstream this change yet. * Should fix GTK/Win32 nightly builds.
2024-10-29teco_interface_cmdline_update() now protects against batch mode (--fake-cmdline)Robin Haberkorn1-0/+7
* Fixes the test suite on PDcurses/Win32 and therefore CI builds. * Should be necessary on UNIX as well since later on, we would access cmdline_window, which is not yet initialized. I didn't see any errors in Valgrind, though.
2024-10-28Mac OS nightly builds: automatically extract package versionRobin Haberkorn1-1/+2
2024-10-28added hidden --fake-cmdline parameter for testing command-line editingRobin Haberkorn4-5/+29
* Supports all immediate editing commands. Naturally it cannot emulate arbitrary key presses since there is no canonic ASCII-encoding of function keys. Key macros are not consequently also not testable. The --fake-cmdline parameter is instead treated very similar to a key macro expansion. * Most importantly this allows adding test cases for rubout behavior and bugs that are quite common. * Added regression test cases for the last two rubout bugs. * It's not easy to pass control codes in command line arguments in a portable manner, so the test cases will often use { and }. Control codes could be used e.g. by defining variables like RUBOUT=`printf '\b'` and referencing them with ${RUBOUT}.
2024-10-28fixed rubbing out <:Xq>, <:^Uq> and other append-to-register operationsRobin Haberkorn4-31/+29
* This was a regression introduced in 41ab5cf0289dab60ac1ddc97cf9680ee2468ea6c, which changed the semantics of teco_doc_undo_set_string(). * Removed undo_append_string() Q-Reg virtual method. append_string() now does its own undo token emission, so that we can defer the teco_doc_undo_edit() after the point that the document was initialized. This is important, so that we can configure the default encoding on new registers.
2024-10-25hopefully fixed win32-gtk nightly builds: explicitly draw in librsvg and ↵Robin Haberkorn1-4/+4
pixbuf loader file name changed
2024-10-24<EC>: fixed hangs on UNIXRobin Haberkorn1-3/+13
* detected under FreeBSD * It turns out that it's unsafe to make the GIOChannel blocking even though the application has already terminated and the channel should be closed automatically. The channel does not report EOF, but instead we have to look for zero reads - in complete contrast to the behavior on Windows. Apparently, it's very tricky to use this API correctly (ie. it sucks). * fixup to e9bef20a8ad89d304fe3e8fafa00056d22de2326
2024-10-21fixed some interruptions of <EC> on Win32Robin Haberkorn2-6/+30
* We now recreate the event loop with every call since it turned out that the idle watcher wouldn't be invoked after the event loop has been quit once. This at least fixes interruption of ECbash -c 'while true; do true; done'$. * Unfortunately, ECping -t 8.8.8.8$ still cannot be interrupted (unless you manually kill the process from the task manager).
2024-10-21GTK/Win32: include trailing null byte in gtk_selection_data_set_text()Robin Haberkorn1-1/+6
* This API behaves very strangely and differently compared to UNIX/X11. When getting, it returns a trailing null for all clipboard contents (unless the clipboard is empty) and when setting, we apparently have to include it as well. At least since we cut it off when getting. Even more strangely, setting without the trailing null did work when pasting in external apps. (How they know when it's safe to throw away the trailing null is mysterious.) * In other words, this fixes X~G~.
2024-10-21<EC>: fixed insertion of data garbage (invalid reads) and omissionsRobin Haberkorn2-8/+18
* This has only ever observed on Win32, probably because the spawning behaves very differently. * The stdout watcher could be invoked even after removing the source, so we must be secured against it - this was causing some overflows and invalid reads. * Also, teco_eol_reader_convert() could return 0 even after process termination, which would sometimes result in too few bytes being inserted. This could be provoked relatively easily by invoking ECdir$ repeatedly.
2024-10-21GTK/Win32: fixed clipboard retrieval (trailing nulls)Robin Haberkorn1-0/+5
* Contrary to the Gtk documentation, the gtk_selection_data_get_length() already includes a trailing null, so we always inserted a bogus null char when using G~ or ^EQ~.
2024-10-21fixed EOL conversion on UTF-8 textsRobin Haberkorn4-6/+8
* The old bug of saving gchar in gints, so teco_eol_reader_t::last_char could become negative. * When converting from an UTF-8 text with CRLF linebreaks, we could have data loss and corruptions. * On strings ending in UTF-8 characters, teco_eol_reader_t::offset would overflow, resulting in invalid reads and potentially insertion of data garbage. I observed this with G~ on Gtk. * Test cased updated. Couldn't reproduce the bug with the test suite, though.
2024-10-19<EC>: perhaps fixed race conditions and problems when creating and ↵Robin Haberkorn3-4/+35
terminating process groups on Win32 * Sometimes already the job assignment failed in CI builds. We now check whether the process is still alive before throwing an error. * We now set the JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE flag. This theoretically shouldn't be necessary when using TerminateJobObject(), but who knows.
2024-10-19Scinterm: fixed building on older versions of Mac OSRobin Haberkorn1-0/+0
* they don't have A_ITALIC * should fix the nightly builds
2024-10-18fixed the "Editing local registers in macro calls" checkRobin Haberkorn5-6/+13
* The previous check could result in false positives if you are editing a local Q-Register, that will be destroyed at the end of the current macro frame, and call another non-colon modified macro. * It must instead be invalid to keep the register edited only if it belongs to the local Q-Registers that are about to be freed. In other words, the table that the currently edited Q-Register belongs to, must be the one we're about to destroy. * This fixes the solarized.toggle (F5) macro when using the Solarized color scheme.
2024-10-18FreeBSD package: changed website to https://rhaberkorn.github.io/sciteco/Robin Haberkorn1-1/+1
2024-10-18updated Scinterm: italic and underline styles are now supported on CursesRobin Haberkorn2-3/+2
* For instance, when using the Solarized color scheme, comments will be in italics. * The underline style could also be supported in color.set, but currently it's not required. * Unfortunately, this does *not* fix the INDIC_PLAIN indicator style for underlining, so you still cannot use that eg. for spell checking. * See https://github.com/orbitalquark/scinterm/issues/22
2024-10-16set target release to v2.2.0Robin Haberkorn2-2/+2
* The Mac OS package for v2.1.0 actually still encodes "2.0.0". But I am going to ignore this. It's not worth fixing, considering the experimental nature of the Mac OS builds.
2024-10-16grosciteco: support glyphs.pcRobin Haberkorn1-0/+1
* This might fix builds on Ubuntu Bionic. I would have to make another minor release in order to try that out and push another Ubuntu PPA release. * Since the PPA is practically not used by anybody, it's not worth it.
2024-10-16updated FreeBSD port for v2.1.0 releasev2.1.0Robin Haberkorn2-7/+7
2024-10-16Revert "replaced bool completely with gboolean"Robin Haberkorn2-7/+10
This reverts commit 024d26ac0cd869826801889f1299df34676fdf57. This was re-introducing Clang warnings since gboolean is signed. I should have read the git blame before re-introducing gboolean...
2024-10-16www: added v2.1.0 to the "News" sectionRobin Haberkorn1-1/+1
2024-10-16updated ChangeLog, FreeBSD and Debian packages for v2.1.0 releaseRobin Haberkorn3-1/+144
2024-10-16Solarized color scheme: fixed F5 function key macroRobin Haberkorn1-2/+2
The macro prefix was changed from ^F to ^K.
2024-10-16fixup: use teco_machine_t::must_undo instead of trying to identify the ↵Robin Haberkorn6-43/+30
current state machine * The previous solution was not wrong, but unnecessarily complex. We already have a flag for exactly this purpose. * Avoid redundancies by introducing teco_machine_stringbuilding_set_codepage().
2024-10-15fixed memory corruptions due to undoing the ↵Robin Haberkorn5-8/+42
teco_machine_stringbuilding_t::codepage * It's contained in teco_machine_main_t which is created per macro call frame. So after macro calls, the machine no longer exists. It is therefore unsafe to undo its members indiscriminately. * On the other hand, we must undo the codepage setting when run interactively, so it is now only undone when belonging to the commandline macro frame. * This was actually causing memory corruptions on every fnkeys cursor movement, but never caused crashes - probably because the invalid pointers are always pointing to unused parts of the C call stack. * Initially broken in b31b8871.
2024-10-15fixed memory leak when replacing command linesRobin Haberkorn1-3/+2
* this would also leak a few bytes on every of fnkeys.tes' movement commands
2024-10-15updated TODORobin Haberkorn1-43/+91
2024-10-15netbsd-curses: fixed the default escape delayRobin Haberkorn1-22/+22
* Apparently, netbsd-curses overwrites the escdelay on initscr() (if $ESCDELAY is not set), so we have to apply the default 25ms after screen initialization. * The info line is not drawn correctly on netbsd-curses, but only on st/simpleterm. I assume this is just a shortcoming of the included terminfo entry.
2024-10-15improved support for braces within loops: warn about unclosed braces and ↵Robin Haberkorn3-3/+21
allow breaking from within braces For instance, you can now write <23(1;)> without leaving anything on the stack.
2024-10-12grosciteco: added the "ti" glyph (refs #22)Robin Haberkorn1-0/+1
2024-10-11grosciteco: added the "ha" glyph (refs #22)Robin Haberkorn1-0/+1
2024-10-11grosciteco: added the "aq" glyph (refs #22)Robin Haberkorn1-0/+1
2024-10-08htbl.tes: fixed searching for caretRobin Haberkorn1-1/+1
* Due to recent changes, you now have to type S^Q^Q^^$ since the ASCII caret (94) is interpreted as a pattern match character.
2024-10-06fixup b36ff2502ae3b0e18fa862a01fba9cc2c9067e31: fixes pattern match ↵Robin Haberkorn1-0/+1
characters after escaped characters
2024-10-05Gtk UI: support setting and getting clipboards containing null bytesRobin Haberkorn3-13/+57
* added TECO_ERROR_CLIPBOARD for all clipboard-related errors
2024-10-04pattern match characters support ^Q/^R now as wellRobin Haberkorn4-11/+57
* makes it possible, albeit cumbersome, to escape pattern match characters * For instance, to search for ^Q, you now have to type S^Q^Q^Q^Q$. To search for ^E you have to type S^Q^Q^Q^E$. But the last character cannot be typed with carets currently (FIXME?). For pattern-only characters, two ^Q should be sufficient as in S^Q^Q^X$. * Perhaps it would be more elegant to abolish the difference between string building and pattern matching characters to avoid double quoting. But then all string building constructs like ^EQq should operate at the pattern level as well (ie. match the contents of register q verbatim instead of being interpreted as a pattern). TECOC and TECO-64 don't do that either. If we leave everything as it is, at least a new string building construct should be added for auto-quoting patterns (analoguous to ^EN and ^E@).
2024-09-28replaced bool completely with gbooleanRobin Haberkorn2-10/+7
2024-09-28fixed compilation on most compilers due to goto beyond g_auto() declarationRobin Haberkorn1-3/+3
2024-09-28some minor fixes to help (?) commandRobin Haberkorn1-2/+2
2024-09-28check the memory limit and allow interruptions when loading filesRobin Haberkorn2-5/+28
* Previously you could open files of arbitrary size and the limit would be checked only afterwards. * Many, but not all, cases should now be detected earlier. Since Scintilla allocates lots of memory as part of rendering, you can still run into memory limits even after successfully loading the file. * Loading extremely large files can also be potentially slow. Therefore, it is now possible to interrupt via CTRL+C. Again, if the UI is blocking because of stuff done as part of rendering, you still may not be able to interrupt the "blocking" operation.
2024-09-28FreeBSD/jemalloc: fixed recovery after hitting memory limitRobin Haberkorn1-0/+10
* We now set opt.retain=false for the process, so jemalloc returns freed memory and the RSS decreases when recovering from memory limit hits. This should be safe at least on FreeBSD. * Either the opt.retain option is new or I was previously testing this only on 32-bit systems.
2024-09-28fixed memory limiting if the process' memory usage is larger than 2GB and ↵Robin Haberkorn1-7/+8
overflow checking * teco_memory_usage is now an unsigned integer. * Unfortunately we currently rely on the variable being int-sized since we use atomic operations. This means on 64-bit systems, limiting will not work as expected if you set the limit larger than 4GB. Not sure whether this should be fixed. * Calling teco_memory_check() with a non-null request-size was totally broken and could result in bogus failures. This is currently used exclusively for checking backwards searches.
2024-09-26Git lexer: added support for TAG_EDITMSG and MERGE_MSGRobin Haberkorn2-1/+4
* Curses: "icons" have also been added
2024-09-25Curses: added "Git" icons for COMMIT_EDITMSG and git-rebase-todoRobin Haberkorn1-0/+2
2024-09-25fixed rubbing out (some) string building constructs at the beginning of the ↵Robin Haberkorn1-7/+2
command line argument * For instance, you can now rub out ^Q^W at the beginning of a string argument. Otherwise, pressing Ctrl+W after ^Q^W would rub out only the ^W. The next Ctrl+W would then insert ^W, due to special immediate editing inhibition after ^Q. * This still only works if the string building construct expanded to at least one byte. Suppose you have ^EQq, expanding to nothing, pressing Ctrl+W would chain to the default teco_state_process_edit_cmd() and the entire command would be rubbed out. This is probably tolerable.