aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2025-03-07ncurses: support monochrome terminalsRobin Haberkorn3-12/+27
* If the background color would be non-black, render text in reverse video. ncurses doesn't do that automatically. * Fixes rendering under historical terminals like VT100 and VT240, but also all of the monochrome versions of modern emulators in terminfo. * This also improves the situation when $TERM is set to something conservative, e.g. when connecting via RS232. * Scinterm is temporarily changed to my own fork, which already contains a monochrome patch.
2025-03-04grosciteco(1): fixed the exampleRobin Haberkorn1-2/+1
We don't need to specify the "woman.tec" output file as the default is sufficient. If it has to be specified, it's now done with `-t`.
2025-03-03rename sample.teco_ini to fallback.teco_ini and mung it by defaultRobin Haberkorn11-24/+51
* After installation, SciTECO will therefore start into a more userfriendly mode even if the user does not create a custom ~/.teco_ini. It is hoped that this will scare away less of new users, who are not willing to read through all of the documentation. Still, users are warned in the absence of ~/.teco_ini. This warning however, might not be immediately visible, especially not when running gsciteco without an attached console. (This will change once I redo the UI and allow a number of messages to be queued in the message area.) * Theoretically, you could also just extend fallback.teco_ini from ~/.teco_ini, but that would require installing it into $SCITECOPATH. * Since the fallback profile will now be munged automatically on a wide range of systems, we set up xclip only when detecting X11 ($DISPLAY is non-empty). E.g. when running under Wayland or the Linux console, you still won't get the clipboard registers, which is probably better than having the clipboard operations fail once you try to use them. * xclip is now "suggested" on Debian/Ubuntu. Unfortunately we cannot pull it in only in the presence of X11.
2025-03-02NEWS: there are FreeBSD binary packages nowRobin Haberkorn1-1/+0
2025-03-02refactored GTK implementation of teco_view_t into its own fileRobin Haberkorn3-96/+127
Also makes sense since all other GObject classes are in separate files.
2025-03-02GTK: always scroll caret when window size changesRobin Haberkorn2-50/+59
* The old implementation would scroll only once for the file first opened and too early. As a result, opening via `sciteco file:number` did not always scroll to the correct position. Also, `?` would usually not scroll the topic into view. * Instead, we now always scroll in all views, but only if the size allocation changed. This ensures, we can still scroll with the mouse wheel. * Therefore, we have to store the current size allocation per view. Instead of allocating a separate heap object, I decided to subclass the Scintilla GTK class. * Some explicit casts are still necessary since teco_view_t is typedefed to `struct teco_view_t`, but we cannot easily rename the GObject instance structure.
2025-03-02GTK: set the mouse cursor on the Scintilla view to signal business and on ↵Robin Haberkorn3-3/+61
the popup entries * By default, use the "text" cursor - this is the default Scintilla cursor, but inhibited by the GtkEventBox I used to catch all input events. * When processing input events, the cursor is changed to "wait". This is done with a small delay in order to avoid flickering during normal typing. The cursor is only changed after 100ms of activity, i.e. only when executing long loops or external programs. * We use the raw GSource API since it's tricky to work with source ids if the source could be removed in the meantime. * The popup entries' cursor is also changed to "pointer" (hand) to give a hint that it can be clicked.
2025-03-01CI: the IRC posting is now in a separate workflow and runs only after ↵Robin Haberkorn2-17/+33
successful ci.yml runs * people are not spammed with commits, that may cause problems when they try to pull them and rebuild
2025-03-01CI: fixed posting of latest commits into the IRC channelRobin Haberkorn1-10/+17
* This will post on __every__ push. In the future, we might want to post only after successful CI and consequently since the last commit, that had a successful CI run.
2025-03-01GTK: improved the RGB values of the 16 default colorsRobin Haberkorn1-18/+48
* Using the same values as on Curses/scinterm resulted in too dark colors with terminal.tes. (solarized.tes actually defines all colors with its own RGB values, so the look has always been consistent between Curses and GTK.) This is because the values like 0xFF0000 for red are actually just placeholders in Scinterm, in turn translated internally to Curses colors, which are interpreted by terminal emulators with possibly various different color palettes. * We therefore now use the exact RGB values as will be used by common terminal emulators like xterm and st. It does not guarantee that the colors will always match between Curses and GTK, but at least the GTK colors are now a bit brighter.
2025-03-01fixed clicking the file completion popup in ~/Robin Haberkorn2-1/+5
* Popup entries are added with expanded directory names, so we have to skip the expanded directory names from the clicked popup entries.
2025-03-01CI: post all new commits into the IRC channelRobin Haberkorn1-0/+10
2025-02-28cheat sheet: removed reference to M#xc, mention mouse support and :EFRobin Haberkorn2-8/+20
2025-02-27implemented ncurses clipboard support via external processesRobin Haberkorn6-53/+254
* As an alternative to OSC-52, which is rarely supported by terminal emulators. * Makes the new mouse support much more useful since you rely on good builtin clipboard support. You can no longer e.g. just double-click a word to copy it into the "primary" selection as terminal emulators do by default. * Set $SCITECO_CLIPBOARD_SET/GET e.g. to xclip, way-copy, pbcopy or some wrapper script. * This is currently using POSIX-specific popen() API, so it behaves a bit different to command execution via EC/EG. I am not sure if it's worth rewriting with the GSpawn-API, since it will be used only on POSIX anyway and a GSpawn-based implementation is likely to be a bit larger. * Should there be some small command-line utility for interacting (esp. pasting) via OSC-52, built-in OSC-52 support could well be removed from SciTECO. Currently, I know only of https://github.com/theimpostor/osc/ and it requires very recent Go compilers. (I still haven't tested it. Quite possibly, pasting when run as a piped command is impossible.)
2025-02-27updated Scinterm: fixes superfluous window refreshes, which resulted in ↵Robin Haberkorn1-0/+0
flickering when scrolling the popup window * see https://github.com/orbitalquark/scinterm/issues/26 * scintilla_wnoutrefresh() actually caused a refresh(), thus updating the physical screen before calling teco_curses_info_popup_noutrefresh() and doupdate(). * This was visible when redrawing the both Scintilla view and popup often as happens during scrolling or when clicking on the popup borders. * This was probably broken since v2.1.0.
2025-02-27EC/EG command: check for null-bytes in $COMSPEC/$SHELLRobin Haberkorn1-6/+10
Environment variables will of course never contain null-bytes. However you can always set them later on from TECO code and include nulls. We therefore everywhere check for null-bytes in all registers used as null-terminated strings to avoid unexpected behavior.
2025-02-24fixup: removed the `?` rubout test caseRobin Haberkorn1-6/+0
We cannot practically test `?` since it relies on women pages being installed into the $SCITECOPATH. While we do set $SCITECOPATH to the source tree, we cannot currently provide the generated women pages to test scripts, unless installing the project first.
2025-02-24fixed rubbing out `?` (help) after editing a Q-RegisterRobin Haberkorn3-4/+11
* Test case: @EQa// @?/EX/ -- Rubout should return you to the Q-Register view. * The test suite has been extended. Unfortunately we cannot currently directly check whether we're editing a Q-Register. But we add a magic number of characters to the Q-Register, that we can check afterwards.
2025-02-24Gtk: fixed MOUSE macro invocation when detecting double/triple clicksRobin Haberkorn1-1/+5
* At the SciTECO API level (-nEJ), there are no double clicks. We must therefore ignore the GDK_2BUTTON_PRESS and GDK_3BUTTON_PRESS events, that are delivered when GTK detects double or triple clicks. They are only sent in addition to GDK_BUTTON_PRESS, so it's safe to simply ignore them. * This was causing spurious RELEASED events, which were confusing the ^KMOUSE macro from fnkeys.tes, causing the wrong buffer range to be inserted into the command line.
2025-02-24Curses: fixed flickering when scrolling through the auto-completion popup ↵Robin Haberkorn2-8/+14
(or generally when keeping it on screen even unchanged) * Turns out that updating the hardware cursor - which is not displayed anyway - would cause premature screen updates in teco_interface_refresh(), thus causing flickering, for instance when quickly cycling through the auto completion popup. Or even just when clicking its borders which does not change it. * Touching the popup window is actually important and expected since Scinterm is also touching its window by completely redrawing it. Touching the popup window makes sure, it's still copied into newscr and overlaps the Scintilla view even if the popup did not change - e.g. when pressing an unassigned function key or clicking on the popup borders.
2025-02-24Curses: avoid completing filenames when clicking the upper border of the ↵Robin Haberkorn1-0/+4
popup window
2025-02-23updated TODORobin Haberkorn1-11/+49
2025-02-23support mouse interaction with popup windowsRobin Haberkorn22-59/+454
* Curses allows scrolling with the scroll wheel at least if mouse support is enabled via ED flags. Gtk always supported that. * Allow clicking on popup entries to fully autocomplete them. Since this behavior - just like auto completions - is parser state-dependant, I introduced a new state method (insert_completion_cb). All the implementations are currently in cmdline.c since there is some overlap with the process_edit_cmd_cb implementations. * Fixed pressing undefined function keys while showing the popup. The popup area is no longer redrawn/replaced with the Scintilla view. Instead, continue to show the popup.
2025-02-16only scroll the caret if dot changesRobin Haberkorn2-15/+28
* Fixes scrolling with default ^KMOUSE macro from fnkeys.tes which adjusts the scroll position without changing dot. The unconditional SCI_SCROLLCARET would effectively prevent scrolling to any position that does not contain dot.
2025-02-16implemented mouse support via special ^KMOUSE and <EJ> with negative keysRobin Haberkorn11-61/+439
* You need to set 0,64ED to enable mouse processing in Curses. It is always enabled in Gtk as it should never make the experience worse. sample.teco_ini enables mouse support, since this should be the new default. `sciteco --no-profile` won't have it enabled, though. * On curses, it requires the ncurses mouse protocol version 2, which will also be supported by PDCurses. * Similar to the Curses API, a special key macro ^KMOUSE is inserted if any of the supported mouse events has been detected. * You can then use -EJ to get the type of mouse event, which can be used with a computed goto in the command-line editing macro. Alternatively, this could have been solved with separate ^KMOUSE:PRESSED, ^KMOUSE:RELEASED etc. pseudo-key macros. * The default ^KMOUSE implementation in fnkeys.tes supports the following: * Left click: Edit command line to jump to position. * Ctrl+left click: Jump to beginning of line. * Right click: Insert position or position range (when dragging). * Double right click: insert range for word under cursor * Ctrl+right click: Insert beginning of line * Scroll wheel: scrolls (faster with shift) * Ctrl+scroll wheel: zoom (GTK-only) * Currently, there is no visual feedback when "selecting" ranges via right-click+drag. This would be tricky to do and most terminal emulators do not appear to support continuous mouse updates.
2025-02-15fixup: set the GH_TOKEN environment variable to fix using the `gh` tool in ↵Robin Haberkorn1-0/+2
nightly builds
2025-02-15nightly builds: use Github API to download pkg2appimage toolRobin Haberkorn1-2/+2
* the filenames contain commit hashes now, so it's no longer trivial to do with wget * should fix nightly builds
2025-02-15redefining labels is a warning nowRobin Haberkorn5-64/+94
* Allowing label redefinitions might have been useful when used as comments, since you will want to be able to define arbitrary comments. However as flow control constructs, this introduced a certain ambiguity since gotos might jump to different locations, depending on the progression of the parser. * On the other hand, making label redefinition an error might disqualify labels as comments when writing or porting classic TECO code. Therefore, it has been made a warning as a compromise. * Added test case
2025-01-20AppImage: added AppStream metadataRobin Haberkorn4-0/+58
Should improve the SciTECO site at the AppImages Hub (appimage.github.io). We will have to make another PR before the site gets updated.
2025-01-19Mac OS nightly builds are relocatable nowRobin Haberkorn1-1/+4
* This means you should be able to install them into non-root directories. E.g.: sudo installer -pkg sciteco-curses_nightly_macos_x86_64.pkg -target test-installation
2025-01-19support :EF for saving a file before closing itRobin Haberkorn4-46/+60
Analoguous to :EX, but always saves the file like EW$, not only if it's dirty.
2025-01-19file and directory auto completions can now be case-insensitiveRobin Haberkorn2-8/+70
* This is not simply determined at compile-time but queries the concrete path at least on Windows and OS X. * The Windows implementation is kind of hacky and relies on undocumented behavior. It's also not even tested yet! * On Linux and FreeBSD completions will always be case-sensitive as they used to be. There does not appear to be any API to query case sensitivity of a given path or even the entire file system. At most, we could white-list a number of case-insensitive file systems.
2025-01-13updated copyright to 2025Robin Haberkorn67-67/+67
2025-01-13mention the Alpine package and updated TODORobin Haberkorn3-4/+18
2024-12-30support +line[,column] and filename:line:column syntaxes when opening filesRobin Haberkorn7-35/+94
* This is done via the new opener.tes in the standard library. * Some programs that use $EDITOR expect the +line syntax to work. * You can copy filename:line:column directly from GCC error messages and filename:line from grep output. * Since there may be safe file names beginning with "+" or containing colons, there needs to be a way to turn this off, especially for scripts that don't know anything about the filenames to open. This is done with "--". Unfortunately, the first "--", that stops parameter processing, is always removed from the command line and not passed down into TECO land. This is not a problem for stand-alone scripts, since the script filename is already stopping option processing, so "--" would get passed down. But when calling the profile via `sciteco -- ...`, you could prevent leading minus signs to cause problems but since the `--` is removed, opener.tes cannot use it as a hint. Therefore, we introduced `-S` as a new alternative to `--`, that's always passed down as `--` (i.e. it is equivalent to "-- --"). In other words, `sciteco -S *` will always open exactly the specified files without any danger of misinterpreting certain file names. Should we ever switch to a custom option parsing algorithm, we might preserve "--" (unless after --mung) and thus get rid of "-S". * This advanced behavior can be tweaked by the user relatively easily. In the easiest case, we could replace M[opener] with <:L;R 0X.f [* @EB/^EN.f/ ]* L> in ~/.teco_ini to completely disable the special syntax.
2024-12-28updated cheat sheet: @Xq, S...$^SC and lots of microtypographic improvementsRobin Haberkorn1-46/+54
2024-12-28website: added v2.3.0 screenshotRobin Haberkorn1-0/+4
2024-12-28Debian: disabled parallel builds when running the test suiteRobin Haberkorn2-3/+3
* Hopefully makes the log easier to read in case of failures. There may still be 2 runs concurrently since we build Curses and Gtk in parallel. * Updated homepage. * Ubuntu plucky builds are failing. See https://launchpadlibrarian.net/765999455/buildlog_ubuntu-plucky-amd64.sciteco_2.3.0-0ppa1~plucky1_BUILDING.txt.gz This may have been a spurious failure due to xvfb-run. It may be less likely with --no-parallel. Theoretically we could bump the Debian package version in order to test that, but the PPA is practically not used by anybody anyway.
2024-12-28Scintilla/Gtk apparently no longer depends on g_module and we draw in ↵Robin Haberkorn1-2/+1
g_module along with glib anyway
2024-12-28avoid some compiler warningsRobin Haberkorn3-4/+4
2024-12-27fixup: fixed installation of dependencies for win64-gtkRobin Haberkorn1-4/+4
2024-12-27nightly builds now include 64-bit Windows builds (MINGW64)Robin Haberkorn2-30/+28
* 32-bit binaries have been dropped, even though we could build both. But there is virtually no demand for 64-bit binaries left. * I continue to build 32-bit versions during CI, so that at least something still builds and tests under 32-bit.
2024-12-27distribute.mk: added Poudriere commands (FreeBSD packaging tests)Robin Haberkorn1-0/+14
* This does not build the current source tree. You must still have a properly set up ports tree somewhere.
2024-12-25prepared v2.3.0 releasev2.3.0Robin Haberkorn4-7/+45
2024-12-25FreeBSD port: overwrite BINMODE, fixing `make package` without rootRobin Haberkorn1-0/+4
Turns out that the FreeBSD ports Makefiles install programs and scripts with 0555 by default, i.e. without write permissions. This broke the install-exec-hook unless building as root. Unfortunately, this also broke the Poudriere builds at the FreeBSD build servers. See https://pkg-status.freebsd.org/package19/data/141amd64-default-build-as-user/aa1f9b124e36/logs/errors/sciteco-curses-2.2.0.log
2024-12-24added session.fossil for setting up buffer sessions per Fossil repositoryRobin Haberkorn1-0/+0
* This goes into session.vcs as well. * `fossil info` does not allow printing only the local-root property, so we have to do some parsing afterwards.
2024-12-24simplified session.svn: no need to mess around with XMLRobin Haberkorn1-0/+0
* In fact, since SVN has --no-newline, this is even simpler than on Git and Mercurial. * This requires at least Subversion v1.9 (2015, so should be safe).
2024-12-24added AX_REQUIRE_DEFINED() macro: should fix builds on systems without the ↵Robin Haberkorn1-0/+37
autoconf archive (including CI)
2024-12-24added AX_WITH_CURSES for more robust ncurses checksRobin Haberkorn5-16/+601
* Turns out that on SunOS/OmniOS the ncurses port does not ship with a ncursesw pkg-config file, but the ncurses file is for a version, that does contain widechar support as well. * Instead of adding yet another recursive PKG_CHECK_MODULES() call, we now use the AX_WITH_CURSES() macro, which is probably more robust. This should at least fix ./configure on OmniOS. * It also adds a number of feature C macros, that could be useful to check in the future. * At the moment, we strive to support all X/Open-compatible Curses libraries, but both enhanced and color functions are required. Therefore plain SVr4 Curses is not supported. * source: https://www.gnu.org/software/autoconf-archive/ax_with_curses.html
2024-12-24introduced true block and EOL commentsRobin Haberkorn83-196/+297
* The previous convention of !* ... *! are now true block comments, i.e. they are parsed faster, don't spam the goto table and allow embedding of exclamation marks - only "*!" terminates the comment. * It is therefore now forbidden to have goto labels beginning with "*". * Also support "!!" to introduce EOL comments (like C++'s //). This disallows empty labels, but they weren't useful anyway. This is the shortest way to begin a comment. * All comment labels have been converted to true comments, to ensure that syntax highlighting works correctly. EOL comments are used for single line commented-out code, since it's easiest to uncomment - you don't have to jump to the line end. This is a pure convention / coding style. Other people might do it differently. * It's of course still possible to abuse goto labels as comments as TECO did for ages. * In lexing / syntax highlighting, labels and comments are highlighted differently. * When syntax highlighting, a single "!" will first be highlighted as a label since it's not yet unambiguous. Once you type the second character (* or !), the first character is retroactively styled as a comment as well.