aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2024-08-21Curses UI: fixed drawing of boxed indicatorsRobin Haberkorn3-5/+2
* The scinterm submodule temporarily points to my own fork. * This is necessary for the aspell macro on Curses. See https://github.com/rhaberkorn/sciteco/wiki/Useful-Macros#spell-checker * See also https://github.com/orbitalquark/scinterm/pull/19
2024-08-18added troff/nroff lexerRobin Haberkorn7-4/+90
* This is optimized for Groff, but works for Heirloom Troff and Neatroff as well. Currently, the Heirloom and Neatroff requests are just added ontop of the Groff ones. Theoretically, we could also try to separate the keyword lists into a base K&R set with Groff, Heirloom and Neatroff ontop. * The lexer necessarily has many restrictions, as Troff is fundamentally unparseable (like classic TECO) and needs a lot of per-request knowledge. * The "*.mm" extension has been removed from the lexers/cpp.tes. I don't know what language this was for, and I prefer `*.mm` files to be considered Troff. * Temporarily changed the lexilla submodule URL. The corresponding Lexila lexer is in the process of being upstreamed. Once it is, I will probably revert the submodule to the official repository, as the "troff" branch is not stable (can be rebased).
2024-05-23nightly builds: avoid uploading pkg2appimage.AppImageRobin Haberkorn1-3/+3
2024-05-22Gtk AppImage: exclude libglib to improve portabilityRobin Haberkorn1-0/+4
* Since they blacklist Pango among other things, it would use the Pango from the host system with the glib from the AppImage, which resulted in a version mismatch on Linux Mint 21.1. * It is now confirmed to work at least on Linux Mint 21.1. * The Curses AppImage still bundles libglib as SciTECO should be the only thing referencing its functions.
2024-05-22AppImage: fixed the Ubuntu package download URLsRobin Haberkorn2-2/+2
2024-05-22build and upload AppImages as part of nightly buildsRobin Haberkorn5-5/+82
2024-05-22ci.yml: hopefully fixed Mac OS CI builds - it appears we need sudo nowRobin Haberkorn1-1/+1
2024-05-22updated CI workflows: bumped some versionsRobin Haberkorn3-13/+20
* MacOS packages are now built on macos-12 since macos-11 has been deprecated.
2024-03-27don't check for -pthread on MinGWRobin Haberkorn1-7/+8
* probably not necessary for std::thread support in Scintilla * should fix MinGW nightly builds
2024-02-14README: insert image using markdown tag and try to center iconRobin Haberkorn1-3/+2
2024-02-14README: image fixesRobin Haberkorn1-1/+2
2024-02-14README: added demo gifRobin Haberkorn1-1/+4
2024-02-08updated TODORobin Haberkorn1-12/+48
2024-02-08fixed expressions like `1,(2)` or `(1),(2)`: they are reported as two ↵Robin Haberkorn2-0/+4
numbers now * Instead of TECO_OP_NEW, there should perhaps simply be a flag of whether `,` was used.
2024-02-06fixed the power (^*) operator: did not handle corner cases and was inefficientRobin Haberkorn2-1/+31
* in fact, with a negative exponent the previous naive implementation would even hang indefinitely! * Now uses the squaring algorithm. This is slightly longer but significantly more efficient. * added test cases
2024-02-06avoid Groff warnings due to `\` escapesRobin Haberkorn2-3/+3
* It's generally a bad idea to pass backslashes as a glyph in macro arguments, even as `\\` since this could easily be interpreted as an escape. * Instead we now always use `\[rs]`.
2024-02-06use bool instead of guint for 1-bit fieldsRobin Haberkorn2-7/+10
* gboolean cannot be used since it is a signed type * bool is still more readable, even though we mostly use glib typedefs. * AFAIK the glib types are deprecated, so sooner or later we will switch to stdint/stdbool types anyway.
2024-02-03GTK: allow disabling client-side decorations by setting $GTK_CSD=0Robin Haberkorn2-7/+6
* This is the same variable used by gtk3-nocsd, but we will now work even without preloading any libraries. Also, it turns out that gtk3-nocsd does not ship as a FreeBSD port and hasn't been updated in a long time. * Setting this in .teco_ini wouldn't have been easy since the teco_interface_init() is called before any TECO code. Also, you might not even want disable this globally but depending on the window manager. * Therefore, you are advised to `export GTK_CSD=0` in ~/.xsession. * The --no-csd command line option is kept for the time being, but probably serves no more purpose.
2024-02-03Gtk: set icons a bit later after calling gtk_widget_show()Robin Haberkorn1-39/+44
* Also turns out, I will have to use gtk_window_set_icon_list(). * This fixes icons in tabbed and st (when embedding SciTECO).
2024-01-28updated TODORobin Haberkorn1-10/+9
2024-01-28cursor movement via fnkeys.tes now preserves the column as in most text editorsRobin Haberkorn3-28/+67
* Horizontal movements (left/right cursor keys) establish the current column and vertical movements (up/down) will try to keep on that column. * This has long been problematic in SciTECO as it requires state that gets reversed when the command line replacement takes place. * I experimented with encoding the current horizontal position into the braced movement operations as in (123C5U$), but I decided that this was clumsy and I generally did not want these expressions to become even larger. * Instead I decided to add some minimal support to the C core in the form of 4EJ which is like a number register only that it does NOT get reversed on rubout. This is exploited by the fnkeys.tes macros by storing the current position beyond replacements. * In theory, this should be a property of the document, but we cannot easily store custom parameters per document. So instead, there is just one global variable. When editing another buffer, it gets reset to .ESGETCOLUMN$$. sample.teco_ini has been updated. * The current X position only makes sense in the context of fnkeys.tes, as TECO commands like <C> are not necessarily "horizonal" movements. For the same reason, the core does not try to initialize 4EJ automatically when editing new buffers. It's entirely left to the TECO macros. * The commandline replacement is more robust now as it checks braced expressions at the end of the command line more thorougly. It will no longer swallow all preceding braced expressions. Only if they are at least 4 characters in length and end in `C)` or `R)`.
2024-01-22FreeBSD port: allow `make test` and appease `make check-plist`Robin Haberkorn1-0/+6
2024-01-22FreeBSD port: moved xvfb-run.sh to scripts/ subdirRobin Haberkorn2-1/+1
2024-01-21updated copyright to 2024Robin Haberkorn61-61/+61
2024-01-21FreeBSD port: I am now the maintainer and will try to submit it to the ↵Robin Haberkorn1-2/+2
FreeBSD ports tree * see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276492 * also the license is GPLv3+ to be precise
2024-01-20fnkeys.tes: support zooming via F9/F10Robin Haberkorn1-0/+9
* Works only in Gtk of course and only in the parser start state. * Since its side effects can neither be reversed, nor does it have any side effects on the editor state, we can completely rub it out. * Currently, it will only affect the current buffer and only the text area. It would be trivial to apply the zoom to the commandline widget as well (FIXME?). There is currently no way that the zoom value or any font size could be passed to the CSS, though. So the auto-completion overlay could only be zoomed if Gtk supports a zoom factor as well.
2024-01-20removed nonsensical line from sciteco(7) man pageRobin Haberkorn1-1/+0
* was introduced in e7867fb0
2024-01-20fixed Clang warnings about one-bit-wide boolean integers ↵Robin Haberkorn2-7/+7
(-Wsingle-bit-bitfield-constant-conversion) * gboolean is defined as gint which is a signed type. A gboolean 1-bit-wide bitfield cannot have the values 0 and 1 but only 0 and -1. * This wasn't practically a bug unless you would try to compare one of those bitfields with TRUE. * All of those bitfields are now guint, even though this is less self-documenting.
2024-01-13README: mention aksr's Arch packageRobin Haberkorn1-2/+3
* This port is quite basic and does not yet allow building Gtk versions.
2024-01-13fixed <EC$> assertions: specifying empty command strings was undefinedRobin Haberkorn2-19/+23
* passing an empty command string down to the shell would always do nothing, so it doesn't make sense to support that. * for the time being, we generate a proper error * in the future, it might make sense to define some special behavior like repeating the last command - but EC does not currently save the command line anywhere. * The generated documentation is currently ugly (FIXME). mandatory parameters are not properly detected by tedoc and we cannot keep apart Q-Registers from mandatory parameters either. Also, we should allow <param> markup in command summaries.
2023-07-23FreeBSD port: fixed the LEXILLA optionRobin Haberkorn2-76/+77
* The lexer scripts are not installed if the LEXILLA option is disabled, so they need to be excluded from pkg-plist.
2023-07-23FreeBSD port: modified the pkg-message.in to use UCL formatRobin Haberkorn1-0/+7
* The plain text format is deprecated. * Thanks to Bob Eager.
2023-07-06fixed ]$ and ]~ (pop from Q-Reg stack to special Q-Registers)Robin Haberkorn2-164/+90
* This was setting only the teco_doc but wasn't calling the necessary set_string() methods. * The idiom [$ FG...$ ]$ to change the working directory temporarily now works. * Similarily you can now write [~ ^U~...$ ]~ to change the clipboard temporarily. * Added test suite cases. The clipboard is not tested since it's not supported everywhere and would interfer with the host system. * Resolved lots of redundancies in qreg.c. The clipboard and workingdir Q-Regs have lots in common. This is now abstracted in the "external" Q-Reg base "class" (ie. via initializer TECO_INIT_QREG_EXTERNAL()). It uses vtable calls which is slightly more inefficient than per register implementations, but avoiding redundancies is probably more important.
2023-07-05set target release to v2.1.0Robin Haberkorn1-1/+1
2023-07-03fixup 69b4bbb8341cfda5d8456ccbf951034d63e4340c: added missing Makefile for ↵Robin Haberkorn1-0/+87
FreeBSD port * Makefiles are in .gitignore.
2023-07-03introduced TECO_DEBUG_CLEANUP to mark destructors that should only be used ↵Robin Haberkorn10-29/+19
for debug builds * There is cleanup that is not strictly necessary, because it only frees memory which is freed on program termination anyway. * However, it helps to explicitly free everything for debugging memory leaks via Valgrind. * The new macro reduces the number of #ifdef statements. * On NDEBUG, the code of these functions will still be eliminated. * If functions are referenced only from the destructor, there will be no unused function warnings, even in NDEBUG.
2023-07-02added FreBSD port (for ports tree)Robin Haberkorn5-0/+236
* it is supposed to be mainstreamed, but this did not yet happen * even if it will eventually become part of the ports tree, I won't have access to this repo and could not keep it up to date. But I can keep this copy here up to date and it can serve as an upstream source for the ports tree maintainer. * Also, it can be used to build FreeBSD binary packages even now without being part of the official ports tree.
2023-07-02cheat-sheet.mm: minor improvementsRobin Haberkorn1-3/+2
2023-06-28added cheat sheetRobin Haberkorn4-2/+821
* This is supposed to allow new users without any prior exposure to SciTECO to pick up the basics of practical usage of SciTECO as an editor. It almost does not elaborate on scripting-side of things. * This requires a full Groff installation, so the document is not built by default.
2023-06-20Debian: fixed rules (build and binary targets)Robin Haberkorn1-2/+33
* dh_testdir would sometimes cause problems on the PPA servers, so we replaced it with an empty rule. * We need to define the binary-arch and binary-indep targets in order to recurse into the correct subdirectories. I do not understand why this always worked on the Github runner and sometimes even on the PPA servers. Unfortunately, we cannot just call `dh binary-arch -B... -p...` since that would call `dh_install -a` which overrides any `-p` (package), thus trying to install the curses binaries from the Gtk build directory and vice versa.
2023-06-20Debian: updated/modernized config filesRobin Haberkorn3-13/+39
* This resolves must lintian warnings and errors.
2023-06-20fixup 75533443ecae81d6861bdc1402a0e4b271838979: fixes sciteco-gtk Debian ↵Robin Haberkorn1-1/+1
packages
2023-06-19updated ChangeLog for v2.0.0 and TODOv2.0.0Robin Haberkorn2-13/+227
2023-06-19distribute sciteco.desktopRobin Haberkorn3-4/+3
* Useful for packaging on platforms where we can only build from tarballs (FreeBSD) * I don't know whether it's always safe and correct to install this file into $DATADIR/applications, so the file is only distributed but not installed yet. * It contains a hardcoded binary name "gsciteco". This could actually differ depending on the concrete --program-prefix and it would be good to include the exact installation path. This however is not possible as long as we do not install this file.
2023-06-19the SciTECO data installation path is now configurable via --with-scitecodatadirRobin Haberkorn8-21/+26
* This is also the base of $SCITECOPATH. * Changing it is useful for packaging where it is not possible to factor out the common files between Curses and Gtk builds into a "sciteco-common" package. As an alternative, you can now create disjunct sciteco-curses and sciteco-gtk packages. * You will most likely want to use this for Gtk builds as in: --with-interface=gtk --program-prefix=g --with-scitecodatadir=/usr/local/share/gsciteco.
2023-06-18.teco_ini: don't set up any margins or indention settings on the unnamed bufferRobin Haberkorn1-0/+1
* The lexer.test.* macros don't work on the unnamed buffer, so any per-language indention settings etc. could be accidentally applied to the unnamed buffer.
2023-06-18fixed caret scrolling on startupRobin Haberkorn2-91/+93
* Since Scintilla no longer automatically scrolls the caret (see 941f48da6dde691a7800290cc729aaaacd051392), the caret wouldn't always end up in the view on startup. * Added teco_interface_refresh() which includes SCI_SCROLLCARET and is invoked on startup. This helps with the Curses backend. It also reduces code redundancies. * On Gtk, the caret cannot be easily scrolled on startup as long as no size is allocated to the window, so we also added a size-allocate callback to the window's event box. Sizes are less often allocated to the event box than to the window itself for some strange reason.
2023-05-14resolved warning in gtk-label.c due to wrong enum typeRobin Haberkorn1-1/+1
* This probably did not cause any bugs.
2023-05-14FreeBSD: fixed the poll-thread memory limiting implementation - it's the ↵Robin Haberkorn2-7/+22
default now * On FreeBSD both the dlmalloc replacement and poll-thread via sysctl() work but the poll-thread has been benchmarked to be significantly faster, at least on my machine. You can still ./configure --enable-malloc-replacement of course. * Interestingly, the RSS of the process visible via htop does not decrease after OOMs or command-line terminations - with neither of the implementations.
2023-05-14FreeBSD: fixed test suiteRobin Haberkorn2-3/+5
* it appears to behave similar to Mac OS with regard to recursions