aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2025-04-19updated ChangeLog and TODO for v2.4.0 releasev2.4.0Robin Haberkorn3-40/+209
* ChangeLogs now contain the dates of all releases. * The FreeBSD package must practically be updated after uploading the release tarball.
2025-04-19Gtk: fixed setting the mouse cursor after changing the active bufferRobin Haberkorn2-2/+12
* The GdkWindow stacking order obviously got messed up when swapping out the child widget in the GtkEventBox. * This was probably also responsible for input events coming through to the Scintilla view even though the GtkEventBox should block all input events from reaching the Scintilla view. The event masking in teco_view_new() is probably no longer necessary - but better keep it to be on the safe side.
2025-04-18scite2co: look up file patterns from filter.<lang> properties instead of ↵Robin Haberkorn1-1/+1
file.patterns The former is more basic and usually references file.patterns. This helped for instance with processing SciTE's css.properties.
2025-04-18added CSS lexer configurationRobin Haberkorn3-1/+77
Especially useful since Gtk users are supposed to edit ~/.teco_css.
2025-04-18Gtk/win32: fixed fonts and therefore pango warnings on startup (closes #7)Robin Haberkorn4-8/+14
* The default womanpage font is the abstract "Serif" now, so that should be more portable. "Times" wasn't found on Windows. * Win32 distributions include a custom .teco_css now, which removes the small-caps font attribute from the type label. The default Gtk theme on Windows references the "Segoe UI" font and it doesn't have a small-caps variant. In fact no default Windows font appears to have one. * We could add a custom .teco_ini to win32 distributions as well, but there is currently no need for it. * Do not distribute the /win32 files. They are used only for building Win32/64 packages. There is no point in distributing them in the tarball if the /debian and /freebsd directories aren't distributed as well.
2025-04-18Gtk: prevent drag-and-drop interaction and block more possibly dangerous ↵Robin Haberkorn1-1/+12
touch and scroll events * You could drag and drop text into the Scintilla views, which would confuse SciTECO. * In the future, we might actually want to support programmable drag-and-drop support via special key macros.
2025-04-17nightlies: install fuse for running AppImagesRobin Haberkorn1-0/+1
2025-04-16CI/Nightly builds: Ubuntu 20.04 runners have been disabledRobin Haberkorn4-9/+9
* We can therefore no longer provide 20.04 nightly builds. Perhaps I will manually build binary releases for the v2.4.0 release for the last time. The PPA will still provide 20.04 of course. * The AppImages are consequently also built based on the Ubuntu 22.04 packages, which are now the oldest supported ones.
2025-04-16curses: minor cleanup - avoid preprocessor statementsRobin Haberkorn1-11/+6
2025-04-15try hard to preserve the vertical scrolling position when auto-scrolling dotRobin Haberkorn2-5/+23
* There are cases, especially where the entire buffer is piped through some external process or when removing and reinserting large parts of the buffer, that dot changes very little, but the vertical scrolling position gets resets. This is especially noticable with the macro @^U{[: HECcat$ ]:}, but also with M#cf (clang-format wrapper from "Useful macros"). * We now try to preserve the vertical position ("first visible line") before scrolling caret.
2025-04-14sciteco(1): added EXAMPLES sectionRobin Haberkorn1-0/+49
2025-04-13Gtk: do not attempt automatic ANSI key translation for dead keysRobin Haberkorn1-0/+5
* At least on Windows it was observed that teco_interface_get_ansi_key() would find ANSI keys on other layouts, but nothing corresponding to the key itself. For instance, for a dead caret (^), we'd find backslash. This made it impossible to type caret in the parser start states. * We clumsily detect whether a keyevent refers to a dead key by checking its symbolic name and pass it down to the input method unmodified. * Fixes entering dead keys, at the very least on Windows, but potentially on all other systems as well.
2025-04-13fixed error message for nW and nP if it would move the pointer beyond the ↵Robin Haberkorn1-2/+2
document's boundaries
2025-04-13Curses: the mouse now scrolls two lines per event in the popup windowRobin Haberkorn1-2/+2
This is hardcoded, but in line with the current defaults from fnkeys.tes.
2025-04-13PDCurses/Win: more or less fixed mouse supportRobin Haberkorn1-6/+37
* Both the WinGUI and Wincon variants have their own idiosyncrasies: * WinGUI ignores `mouseinterval(0)` and may report BUTTONX_CLICKED for very quick clicks. Therefore we now emulate separate PRESSED/RELEASED events. * Wincon does not report BUTTONX_RELEASED at all. Therefore we still enable click detection, so that fnkeys.tes will work at least partially. Therefore we also enable REPORT_MOUSE_POSITION, so that right-click-dragging will work. This should still be fixed in PDCurses upstream, though. * See also https://github.com/Bill-Gray/PDCursesMod/issues/330
2025-04-13fixed undoing bitfields on WindowsRobin Haberkorn16-182/+184
* It turns out that `bool` (_Bool) in bitfields may cause padding to the next 32-bit word. This was only observed on MinGW. I am not entirely sure why, although the C standard does not guarantee much with regard to bitfield memory layout and there are 64-bit available due to passing anyway. Actually, they could also be layed out in a different order. * I am now consistently using guint instead of `bool` in bitfields to prevent any potential surprises. * The way that guint was aliased with bitfield structs for undoing teco_machine_main_t and teco_machine_qregspec_t flags was therefore insecure. It was not guaranteed that the __flags field really "captures" all of the bit field. Even with `guint v : 1` fields, this was not guaranteed. We would have required a static assertion for robustness. Alternatively, we could have declared a `gsize __flags` variable as well. This __should__ be safe since gsize should always be pointer sized and correspond to the platform's alignment. However, it's also not 100% guaranteed. Using classic ANSI C enums with bit operations to encode multiple fields and flags into a single integer also doesn't look very attractive. * Instead, we now define scalar types with their own teco_undo_push() shortcuts for the bitfield structs. This is in one way simpler and much more robust, but on the other hand complicates access to the flag variables. * It's a good question whether a `struct __attribute__((packed))` bitfield with guint fields would be a reliable replacement for flag enums, that are communicated with the "outside" (TECO) world. I am not going to risk it until GCC gives any guarantees, though. For the time being, bitfields are only used internally where the concrete memory layout (bit positions) is not crucial. * This fixes the test suite and therefore probably CI and nightly builds on Windows. * Test case: Rub out `@I//` or `@Xq` until before the `@`. The parser doesn't know that `@` is still set and allows all sorts of commands where `@` should be forbidden. * It's unknown how long this has been broken on Windows - quite possibly since v2.0.
2025-04-12freebsd port: synced with upstream port sourcesRobin Haberkorn1-1/+1
2025-04-10testsuite: check whether comparisons for equality really work with the ↵Robin Haberkorn2-12/+27
`a-b"=` idiom * There might theoretically be problems with the uncommon one's complement or magnitude representation of negative integers, but it's practically impossible to meet those in the wild. * Still, we do some checks now, so we will at least notice any exotic architectures. * Also, documented the `a^#b"=` idiom for checking for equality. It's longer to type, but faster and will also work for floats. For floats it will be the only permissible idiom for checking for bitwise equality as `a-b` can be 0 even if a!=b (if the difference is very small). Changing the `-` semantics is out of the question.
2025-04-10fixed formatting of the smallest possible integerRobin Haberkorn4-2/+19
* In other words, fixed `-9223372036854775808\` on --with-teco-integer=64 (which is the default). * The reason is that ABS(G_MININT64) == G_MININT64 since -G_MININT64 == G_MININT64. It is therefore important not to call ABS() on arbitrary teco_int_t's.
2025-04-09fnkeys.tes: mouse scrolling scrolls 2 lines by default and left clicks ↵Robin Haberkorn1-3/+6
update the horizontal position (4EJ)
2025-04-09added SQL lexer configurationRobin Haberkorn3-1/+73
* Unfortunately, the Lexilla lexer does not recognize PostgreSQL multiline strings between $$...$$. * All of the other SQL variants, that Scite supports, are skipped for the time being. They'd probably have to be separate SciTECO lexer configs anyway.
2025-04-09fixup: <EI> command can be at-modified as in `@EI/foo/`Robin Haberkorn1-1/+2
2025-04-09tightened rules for specifying modifiersRobin Haberkorn6-59/+170
* Instead of separate stand-alone commands, they are now allowed only immediately in front of the commands that accept them. * The order is still insignificant if both `@` and `:` are accepted. * The number of colon modifiers is now also checked. We basically get this for free. * `@` has syntactic significance, so it could not be set conditionally anyway. Still, it was possible to provoke bugs were `@` was interpreted conditionally as in `@ 2<I/foo/$>`. * Even when not causing bugs, a mistyped `@` would often influence the __next__ command, causing unexpected behavior, for instance when typing `@(233C)W`. * While it was theoretically possible to set `:` conditionally, it could also be "passed through" accidentally to some command where it wasn't expected as in `:Ifoo$ C`. I do not know of any real useful application or idiom of a conditionally set `:`. If there would happen to be some kind of useful application, `:'` and `:|` could be re-allowed easily, though. * I was condidering introducing a common parser state for modified commands, but that would have been tricky and introduce a lot of redundant command lists. So instead, we now simply everywhere check for excess modifiers. To simplify this task, teco_machine_main_transition_t now contains flags signaling whether the transition is allowed with `@` or `:` modifiers set. It currently only has to be checked in the start state, after `E` and `F`.
2025-04-08minor improvements of TECO_DEFINE_STATE_COMMENT() documentationRobin Haberkorn1-2/+6
All state definition macros document their "base" states as well since they form an inheritance hierarchy.
2025-04-08improved rubbing out commands with modifiersRobin Haberkorn5-63/+142
* This was actually broken if the command is preceded by `@` and `:` characters, which are __not__ modifiers. E.g. `Q:@I/foo^W` would have rubbed out the `:` register as well. * Also, since it was all done in teco_state_process_edit_cmd(), it would also rub out modifier characters from within string arguments, E.g. `@I/::^EQ^W` * Real commands now have their own ^W rubout implementation, while the generic fallback just rubs out until the start state is re-established. This fails to rub out modifiers as in `@I/^W`, though. * Real command characters now use the common TECO_DEFINE_STATE_COMMAND(). * Added test cases for CTRL+W rub out. A few control characters are now portably available to tests via environment variables `$ESCAPE`, `$RUBOUT` and `$RUBOUT_WORD`.
2025-04-04avoid legacy implict rules in doc/Makefile.am: should fix clean buildsRobin Haberkorn1-3/+2
For some strange reason, Make wouldn't know how to get tutorial.ms. Replacing it with an equivalent `%` works flawlessly, though.
2025-04-04scroll caret __almost__ always automatically after key pressesRobin Haberkorn4-9/+16
* The old heuristics - scroll if dot changes after key press - turned out to be too simplistic. They broke the clang-format macro (M#cf), which left the view at the top of the document since the entire document is temporarily erased. Other simplified examples of this bug would be: @^Um{[: HECcat$ ]:} Mm Or even: @^Um{[: H@X.aG.a ]:} Mm * Actually, the heuristics could be tricked even without deleting any significant amount of text from the buffer. The following test case replaces the previous character with a linefeed in a single key press: @^Um{-DI^J$} Mm If executed on the last visible line, dot wouldn't be scrolled into the view since it did not change. * At the same time, we'd like to keep the existing mouse scroll behavior from fnkeys.tes, which is allowed to scroll dot outside of the visible area. Therefore, dot is scrolled into view always, except after mouse events. You may have to call SCI_SCROLLCARET manually in the ^KMOUSE macro, which is arguably not always straight forward. * Some macros like M#cf may still leave the vertical scrolling position in unexpected positions. This could either be fixed by eradicating all remaining automatic scrolling from Scintilla or by explicitly restoring the vertical position from the macro (FIXME). * This was broken since the introduction of mouse support, so it wasn't in v2.3.0.
2025-04-03the tutorial is now built along with all other HTML documents if ↵Robin Haberkorn7-22/+34
--enable-html-docs * `--enable-html-manual` renamed to `--enable-html-docs`. * It's also uploaded to the website and linked to in README.
2025-04-03tutorial: fixed excess space after example display blocks in some versions ↵Robin Haberkorn1-0/+6
of Groff
2025-04-03improved the "asm" (x86 assembly) lexerRobin Haberkorn1-1/+9
There are still some glitches with non-mainstream assemblers like A86, though.
2025-04-01updated Scinterm to v5.4: Only show scroll bars when they can be scrolledRobin Haberkorn1-0/+0
2025-03-31FreeBSD port: ship email lexer and tutorialRobin Haberkorn1-2/+5
The email, git and sciteco lexer configurations are bundled even without the LEXILLA option.
2025-03-31the git, sciteco and email lexer configurations are now installed even ↵Robin Haberkorn1-5/+5
--without-lexilla They don't require Lexilla, so it makes no sense not to exclude them.
2025-03-31fixup: `make clean` removes tutorial.ms nowRobin Haberkorn1-6/+5
Fixes `make distcheck` and CI builds.
2025-03-31grosciteco: added the `oq` and `cq` glyphsRobin Haberkorn1-0/+2
This fixes building of the new tutorial.woman on Ubuntu.
2025-03-31fixup: actually distribute the new tutorial.ms.in fileRobin Haberkorn1-14/+7
2025-03-31fixup: fixed Ubuntu nightly buildsRobin Haberkorn1-1/+1
groff is now required in its entirety
2025-03-31added tutorial document, which is automatically loaded on the first invocationRobin Haberkorn5-1/+329
* This is rendered with ms, so we now need the entire groff on Debian. This is not a big deal as it just adds a few kilobytes of build-time dependencies. Most platforms do not allow installation of some "groff-base" package anyway and always draw in the entire package. * sciteco.tmac has been extended to disable page breaks on ms. * The tutorial is installed like any other woman page and can be invoked interactively with ?tutorial$. * It is optimized to be still usable on a plain 80x24 terminal.
2025-03-31opener.tes: fixed opening filename:line if filename has trailing digitsRobin Haberkorn1-3/+4
The trailing digits where cut off the filename. E.g. when trying `sciteco test.f77:100`, we would open test.f on line 100 instead.
2025-03-29added v2.4.0 screenshot: VT240 emulationRobin Haberkorn1-0/+4
* An Aerc screenshot would also be nice, but I don't have a neutral account set up.
2025-03-29bumped target release to v2.4.0 and updated README and TODORobin Haberkorn4-32/+96
* Added a test case for the known bug of out-of-place modifiers. Well, this is a syntactic shortcoming rather than a true bug. But I did run into it more than once.
2025-03-29^W also rubs out/in `@` and `:` modifiersRobin Haberkorn2-0/+18
* It makes little sense to e.g. rub out until `I` in `@I/foo/`, but leave the `@` modifier. Modifiers have to be considered part of the command, even though the state machine is not currently modelled like that.
2025-03-29added `@W`, `@P`, `@V` and `@Y` command variantsRobin Haberkorn5-140/+144
* They swap the default order of skipping characters. For positive arguments: first non-word chars, then word chars. * This is especially useful after executing the non-at-modified versions. For instance, at the beginning of a word, `@W` jumps to its end. `@V` would delete the remainder of the word. * Since they have to evaluate the at-modifier, which has syntactic significance, the command implementations can no longer use transition tables, so they are in the switch-statements instead.
2025-03-23grosciteco: fixed topic collectionRobin Haberkorn1-1/+1
* regression from 867d22e419afe769f05ad26b61c6ea5ea1432c3c
2025-03-23the ES command (send Scintilla message) now supports passing both wParam and ↵Robin Haberkorn6-18/+44
lParam as null-terminated strings * Being able to embed null bytes into the lParam string is practically useless - there aren't any messages where this is useful and where there are no native SciTECO counterparts - so this case is now catched and the null-byte separates wParam from lParam. * wParam can be the empty string, but it is not supported to pass wParam as a string and lParam as the empty string. If the second string argument ends in ^@, lParam is popped from the stack instead. * This is a temporary workaround until we can properly parse the Scintilla.iface and generate more elegant per-message wrappers. * It in particular unlocks the SCI_SETREPRESENTATION and SCI_SETPROPERTY messages. The former allows us to write a special hex-editor macro which sets hexadecimal character representations, while the latter allows you to set lexer properties. * The C-based lexers ("cpp" in Lexilla) can now take preprocessor definitions into account. This is disabled by default, unless you set lexer.c.defines before opening a file. You can also set it interactively and re-set the lexer. For instance: ^U[lexer.c.defines]NDEBUG$ M[lexer.set.c]
2025-03-23refactored Lexilla/Scintillua support: it's now in teco_create_lexer()Robin Haberkorn1-59/+80
2025-03-23sciteco(7): fixed formatting of some tablesRobin Haberkorn1-4/+4
This was changed ages ago for some old version of Groff. These workarounds should no longer be necessary.
2025-03-23the ^W immediate editing command now mimics `Y` more closely and also rubs ↵Robin Haberkorn4-11/+31
out no-op commands (whitespace) * In string arguments, ^W first rubs out non-word chars (usually whitespace), so it makes sense if ^W would work analogously at the command level. A non-command would be one of the no-ops.
2025-03-22build nightlies on Ubuntu 24.04 as wellRobin Haberkorn2-2/+2
* Also run CI on 24.04. * The Ubuntu 20.04 runner is deprecated soon until 1. April 2025, but for the time being we keep supporting it as well.
2025-03-22added `P` command as a reverse form of `W`Robin Haberkorn5-9/+49
* All the movement commands have shortcuts for their negative forms: `R` instead of `-C`, `B` instead of `-L`. Therefore there was always the need for a `-W` shortcut as well. * `P` is a good choice because it is a file IO command in TECO-11, that does not make sense supporting. In Video TECO it toggles between display windows (ie. split screens) and I do not plan to support multiple windows in SciTECO. * Added to the cheat sheet.