Commit graph

1,380 commits

Author SHA1 Message Date
huwwa
7d7a7d0fac shell: update toggle input status message 2026-05-11 00:21:56 +02:00
huwwa
2af3c40706 shell: split interactive and non-interactive shell commands 2026-05-11 00:21:56 +02:00
huwwa
5b87d2e4ff shell: manage interactive mode and readonly state
* decouple interactive mode from cursor position.
* clear readonly when entering interactive mode and
  restore when leaving it.
* simplify navigation logic by removing offset-based toggling.
* set pager mode on interactive shell exit.
2026-05-11 00:21:56 +02:00
Charlie Gordon
3f9f332268 Mojo: fix string parsing
* simplify string parsing and state bits
* fix raw string parsing
* support template strings with recursive coloring
2026-05-11 00:20:33 +02:00
Charlie Gordon
b3433cf4f4 Lang: add colorizer for the Mojo language
* initial support for [Mojo](https://mojolang.org/), a high performance language
  with a Python-like syntax by Modular
2026-05-10 17:35:05 +02:00
Charlie Gordon
582a6ee384 Modes: Add MDX mode for markdown/JSX mixed contents
* preliminary support for [MDX](https://mdxjs.com/) mode
* uses only markdown for now, will detect and colorize JSX parts later
2026-05-10 17:34:48 +02:00
Charlie Gordon
b3355d3224 fix compilation warning 2026-05-06 14:23:14 +02:00
huwwa
8a9c4412ed shell: check process termination before closing 2026-05-06 14:23:14 +02:00
huwwa
668a4be142 shell: avoid leaving stray processes when reusing a shell buffer
* check for active processes in shell buffers before reusing them,
  and prompt the user to kill the running process to avoid leaving
  it detached and unreachable.
2026-05-06 14:23:14 +02:00
huwwa
640ad15e4d shell: try to split window for shell commands 2026-05-06 14:23:14 +02:00
huwwa
db2bbc4c71 remove extra new line with caption
* `ctime` format ends with a new line.
2026-05-06 14:23:14 +02:00
huwwa
4d3e1e0810 shell: encapsulate error variables in a global ShellError structure 2026-05-06 14:23:14 +02:00
huwwa
c6ea0d0d8c avoid mode name collision 2026-05-06 14:23:14 +02:00
huwwa
b3f37b7b23 check for active process associated with the buffer before killing it
* killing a shell buffer while its process is still running can leave the
  process alive but no longer accessible.
2026-05-06 14:23:14 +02:00
huwwa
42c88b10ca default exit status to -1 if not launched 2026-05-06 14:23:14 +02:00
huwwa
aeb0767a3c fix: defer pty closure until buffer is fully drained
fixes a race condition where pty data was lost on process exit.
The pid callback now flags the exit status, while `shell_read_cb`
handles the final teardown. This prevents truncation for
high-throughput processes.
2026-05-06 14:23:14 +02:00
huwwa
adc72a8b0a set readonly flag for compilation buffer 2026-05-06 14:23:14 +02:00
huwwa
9502e20d52 fix: use appropriate buffer flag 2026-05-06 14:23:14 +02:00
Charlie Gordon
74ed0a3806
windows: fix glitches in window size management (#109)
* fix bug on screen resize with default dired layout
* fix resize bug: vertical layout changed when screen width was adjusted
* rename `update_split_ratio` as `compute_virtual_window_size`
* remove `update_all_split_ratios` and `restore_coordinate_from_ratio`
* recompute window size in more necessary places
* use character sizes for minimum window width/height
* show virtual window size in `describe-window`
* add `C-x V` binding for `shrink-window`
2026-05-05 21:07:03 +02:00
4g4
de8bd02766
winlayout: use virtual coordinates to keep split ratio when changing screen dimensions (#93)
* add virtual window dimensions `xx1, xx2, yy1, yy2` in units of 1/1024
* update virtual coordinates when dragging vertical/horizontal split separator
* update window size using virtual coordinates on terminal resize
2026-05-04 10:24:50 +02:00
4g4
d2178d9b3b
Fix compile warning on macOS (#107)
* the macro `LIST_HEAD` is already defined in macOS
* rename macro `LIST_HEAD` as `QE_LIST_HEAD`
2026-05-04 08:29:43 +02:00
4g4
91f7ff6fe2
fix: occur command didn't clear the previous result (#104)
The `occur` command creates an `*occur*` buffer to show the matches in the current buffer.
If we used `occur` to search another string, then the old *occur* buffer was still there and our new search result were not shown. Killing buffer `*occur*` before creating a new one solves the problem.
2026-05-01 09:25:56 +02:00
huwwa
2fd8c1c9bb
bugfix: prevent infinite window splitting (#102)
* refuse to split vertically height is less than 3 line.
* refuse to split horizontally if width is less than 9 characters.
2026-05-01 08:44:07 +02:00
huwwa
f77ea8db3f fix: redraw minibuffer prompt when refocusing window
The minibuffer prompt was not redrawn after switching to another
window and then back to the minibuffer.
2026-04-30 23:05:24 +02:00
Charlie Gordon
6409d7eeb1 build: fix missing prototype warning
* fix clang warning [-Wmissing-prototype]:
  non static functions must be declared prior to definition
2026-04-30 16:38:52 +02:00
4g4
ded51b934f
feature: Add back-to-indentation command (#98)
Move point to the first non-whitespace character on this line.
2026-04-30 15:43:28 +02:00
4g4
202f599e99 Revert "fix bottom right corner refresh"
This reverts commit e593c24afbfec00137bc47a8b89790b295d3db3c.
2026-04-30 15:38:40 +02:00
4g4
5526233480 fix bottom right corner refresh
This hack is only needed in old terminals. In modern terminals we do not
need this. Besides, removing this hack will refresh the bottom right
corner.
2026-04-30 15:38:40 +02:00
Charlie Gordon
a599bc8503 Make important TODOs more obvious 2026-04-30 11:14:26 +02:00
popflag
9bfd8328ca fix #14: handle wrap mode when window is narrow 2026-04-30 09:42:56 +02:00
4g4
6cd79d45df bugfix: fix coredump when resizing terminal window
In the signal handler for the signal SIGWINCH tty_term_resize, we call
tty_dpy_invalidate function. In this function, we change the screen_size
and other critical fields.

While the process is executing the function tty_dpy_flush, and another
SIGWINCH occurs, then the screen_size is changed. And tty_dpy_flush will
access invalid memory which leads to coredump.

In the signal hander of SIGWINCH, we only need to set the flag
complete_refresh.
2026-04-30 08:41:26 +02:00
4g4
7303a8b693 docfix: fix LICENCE file name in README.md
- The filename is LICENSE, not LICENCE.
- There is no BUGS file in the repo.
2026-04-28 18:25:12 +02:00
Charlie Gordon
ebd1363764 CI: disable linux-s390x target
* `linux-s390x` continuous integration target takes too much time (>10mn)
2026-04-28 18:06:49 +02:00
Charlie Gordon
3e0fc4f2ab colorizer: update C2 language keyword list 2026-04-28 17:59:37 +02:00
Charlie Gordon
58174a7247 use FALLTHROUGH instead of fallthrough to avoid clash with x11 2026-03-14 21:55:25 +01:00
Charlie Gordon
93fe952ab8 fix clang 17 compilation warnings 2026-03-14 21:33:53 +01:00
Charlie Gordon
f565f58c10 add c keywords in c2 mode 2026-03-14 21:25:10 +01:00
Charlie Gordon
89f6f9e4c3 add preliminary support for the Janet language 2026-03-14 21:24:10 +01:00
Charlie Gordon
d2db97217c disable transient bindings on next-error and previous-error 2026-02-06 13:02:09 +01:00
Charlie Gordon
60b709afdf add support for the Algol68 language 2026-02-06 13:02:09 +01:00
huwwa
9186032c64 use S_IXUSR instead of S_IEXEC 2026-02-06 12:45:28 +01:00
huwwa
93539ead18 replace depricated getdtablesize with sysconf 2026-02-06 12:45:28 +01:00
Charlie Gordon
70260726f6 Improve colorization for c2 and c3
* support multiline raw c2 strings
* update c3 keyword list
* retire macos-13 CI tests
2026-01-12 20:55:22 +01:00
Charlie Gordon
990b1fbeeb Improve colorization for c, c2 and tcl
* c: fix a glitch in number colorizer
* c2: add type `va_list`
* tcl: add keywords `break`, `continue`, `return`
2025-04-21 22:35:04 +02:00
Charlie Gordon
43b5851958 Update README.md, VERSION and copyrights
* VERSION bumped to 6.4.1
2025-02-10 07:51:29 +01:00
Charlie Gordon
0fcdc0f4c9 Add list-colors and list-styles commands 2025-02-10 00:00:14 +01:00
Charlie Gordon
6f8eb7577b Fix crash bug in libqhtml
* fix crash on "https://support.apple.com/kb/HT208050"
* add missing initializer (stupid oversight)
* fix bogus overflow test (another nasty bug waiting to bite)
We desperately need warnings or idioms against such stupid errors.
Using constructors for all locally defined structures seems advidsable,
2025-02-09 14:52:51 +01:00
Charlie Gordon
af492d00b6 Improve tcl colorizer
* use complete list of internal commands
* use tcl specific word parser
* fix quoted and braced string parsers
* improve variable colorizer
* add custom cases in probe function
* add `ustr_match_str`
2025-02-09 12:54:27 +01:00
Charlie Gordon
9547555fa8 Improve yank behavior in minibuf
* kill minibuffer contents when yanking an absolute path
  when prompted for a filename or directory
2025-02-07 20:40:50 +01:00
Charlie Gordon
0be0462674 Add Colorizer for Tcl/Tk 2025-02-07 20:40:18 +01:00