Commit Graph

3084 Commits

Author SHA1 Message Date
Jöran Karl
0fa4a3a8db
Merge pull request #3354 from JoeKar/feature/action-nightly
workflows: General improvements
2024-06-20 23:24:51 +02:00
Jöran Karl
531c7d88e2 workflow: Fetch with a fetch-depth of 0 and fetch-tags true
This will allow us to read the whole history especially all the tags.
2024-06-20 22:59:05 +02:00
Jöran Karl
c58ed0e51a workflows: Perform the setup uncached 2024-06-20 22:59:05 +02:00
Jöran Karl
f475220e67 workflows/test: Bump version of setup & checkout actions
This will correct the following warning:
"Node.js 16 actions are deprecated."
2024-06-20 22:59:05 +02:00
Jöran Karl
57375e0732 workflows/nightly: Allow manual trigger for better testability 2024-06-20 22:59:05 +02:00
Jöran Karl
d98fafd2f9 tools/build-version.go: Remove the git fetch step
build-version.go shall only provide information and not modify the repository
in which it runs.
2024-06-20 22:59:03 +02:00
Jöran Karl
f5a9744bde tools/build-version.go: Improve error verbosity 2024-06-20 22:30:00 +02:00
Borna Lang
a3e25e3701
docs: Improve plugin documentation (#3240)
* docs: Improve documentation

`commands.md`
  - documented the `reopen` command
  - improved the documentation of the `reload` command

`plugins.md`
  - added direct links to relevant external documentation pages
  - rewrote some sections
  - documented missing functions/callbacks
  - added a note about installing/managing plugins

* Omit number of default plugins

Co-authored-by: Jöran Karl <3951388+JoeKar@users.noreply.github.com>

---------

Co-authored-by: Jöran Karl <3951388+JoeKar@users.noreply.github.com>
2024-06-19 21:35:19 +02:00
Maxim Ostapenko
f0f4afa272
Added a way to install the program in ALT Linux (#3348) 2024-06-19 18:56:05 +02:00
Dmytro Maluka
3fb34cf4f2
Merge pull request #3355 from dmaluka/tab-mouse-events-fix
Fix non-working mouse events at the top line of the screen
2024-06-18 18:10:30 +02:00
Dmytro Maluka
dc62dd9d82
autosave: don't save unmodified buffer (#3356)
Saving a buffer every time without even checking if it was modified
(i.e. even when the user is not editing the buffer) is wasteful,
especially if the autosave period is set to a short value.
2024-06-17 12:59:32 +02:00
Dmytro Maluka
0a6b32d775 TabList: HandleEvent: small refactoring 2024-06-16 14:02:36 +02:00
Dmytro Maluka
badaba66f3 Fix non-working mouse wheel scrolling on the top line of the screen
Scroll the tab bar only if there actually is the tab bar, otherwise
propagate the mouse wheel event to the bufpane.
2024-06-16 13:57:37 +02:00
Dmytro Maluka
602acff42f Fix non-working mouse click on top-left and top-right cells
Scroll the tab bar only if there actually is the tab bar, otherwise
propagate the mouse click event to the bufpane.
2024-06-16 13:57:21 +02:00
Jöran Karl
ced6d9487a
Merge pull request #3334 from JoeKar/feature/action-nightly
nightly: Use GitHub Actions for scheduled builds
2024-06-15 14:35:29 +02:00
Jöran Karl
c701ba66af nightly: Use GitHub Actions for scheduled builds and artifact uploads 2024-06-15 13:24:36 +02:00
Jöran Karl
fc3a5cd038 tools: Improve cross-compile.sh
1. doesn't need a given parameter to set the VERSION,
since it is determined itself
2. moves the *.deb only in case package-deb.sh succeeded
3. rename *.tar.gz to *.tgz shorten the extension to...
4. add SHA256 sums per artifact
2024-06-15 13:24:30 +02:00
Jöran Karl
c965447416 tools: Improve package-deb.sh to check for fpm first and return the result 2024-06-15 13:24:26 +02:00
Mikko
352580a50a
detect .pyw files (#3346) 2024-06-14 19:52:02 +02:00
Alex Rønne Petersen
55f45ce8ff
Fix highlighting of load and reference directives in Cake syntax. (#3341) 2024-06-13 19:57:39 +02:00
Bryan Honof
650c0a8db0
Update README.md to include nix install and flox install (#3340)
* Update README.md to include nix install and flox install

* Update README to indent Linux install section
2024-06-12 19:23:49 +02:00
Commander Nout
bad1a4b8ca
Update README.md to add brew install on MacOS (#3338)
Add installation option for Homebrew on MacOS. Homebrew is a popular package manager on MacOS - likely more popular than MacPorts.
2024-06-11 22:00:58 +02:00
Jöran Karl
5540cae610
Merge pull request #3337 from dmaluka/keyrune-usage-fix
Fix usage of tcell's `Rune()`
2024-06-10 21:01:27 +02:00
Dmytro Maluka
25c7fa55b1 De-duplicate code for KeyEvent creation 2024-06-10 02:54:37 +02:00
Dmytro Maluka
a85696d5e0 Don't use tcell's Rune() for non-KeyRune events
According to tcell documentation, Rune() should only be used for KeyRune
events. Otherwise its return value is not guaranteed and should not be
relied upon.

This fixes issue #2947: Esc key not working on Windows, since tcell
sends lone Esc key event with rune == 0 on Unix but with rune == 27
(the keycode) on Windows.
2024-06-10 02:30:55 +02:00
Alex Rønne Petersen
9face7484e
Update Zig syntax to handle ZON (Zig Object Notation) files. (#3329) 2024-06-09 17:57:22 +02:00
Dmytro Maluka
9eb8782ff2
Rework FindMatchingBrace() interface and implementation (#3319)
Instead of passing a single brace pair to FindMatchingBrace(), make it
traverse all brace pairs in buffer.BracePairs on its own.

This has the following advantages:

1. Makes FindMatchingBrace() easier to use, in particular much easier
   to use from Lua.

2. Lets FindMatchingBrace() ensure that we use just one matching brace -
   the higher-priority one. This fixes the following issues:

    ([foo]bar)
     ^

when the cursor is on `[`:

- Both `[]` and `()` pairs are highlighted, whereas the expected
  behavior is that only one pair is highlighted - the one that the
  JumpToMatchingBrace action would jump to.

- JumpToMatchingBrace action incorrectly jumps to `)` instead of
  `]` (which should take higher priority in this case).

In contrast, with `((foo)bar)` it works correctly.
2024-06-05 00:56:19 +02:00
Massimo Mund
46e55c8e91
Fixed trailing line spaces being ignored by word- or subword-jumps (#3321) 2024-06-04 21:10:09 +02:00
Neko Box Coder
dd913df9e9
Reordered prompt done callback to avoid accessing out of bound history (#3318)
* Reordered prompt done callback to avoid accessing out of bound history

* Formatting
2024-06-02 20:00:13 +02:00
Jöran Karl
e9bd1b35f4
Merge pull request #3270 from niten94/sh-break-continue
Add, move commands in shell syntax file
2024-05-22 22:21:06 +02:00
niten94
4911a56181 Add commands in shell syntax file
Add `break`, `command`, `continue`, `eval`, `exec`, `getopt`, `getopts`,
`trap` and `wait` command in shell syntax file.
2024-05-23 00:59:58 +08:00
niten94
343812bd2e Change color of commands in shell syntax file
Move `local`, `read`, `shift` and `time` to "Shell commands" in shell
syntax file.
2024-05-23 00:49:13 +08:00
Jöran Karl
35630aa736
Merge pull request #2665 from masmu/feature/sub-words
Implemented sub-word cursor movement
2024-05-22 06:24:19 +02:00
Massimo Mund
78fcf2fc31 Updated WordLeft() and WordRight() behavior to be in line with SubWordLeft() and SubWordRight() 2024-05-20 23:23:33 +02:00
Massimo Mund
5dbdf8c0e8 Implemented SubWordRight, SubWordLeft, SelectSubWordRight, SelectSubWordLeft and DeleteSubWordRight, DeleteSubWordLeft 2024-05-20 23:23:33 +02:00
Massimo Mund
889a841575 Replaced IsNonAlphaNumeric() with IsNonWordChar() 2024-05-20 23:23:33 +02:00
Dmytro Maluka
917650826a
Merge pull request #3291 from dmaluka/diffgutter-cleanup
Diffgutter: simplify + fix race
2024-05-14 18:03:07 +02:00
Dmytro Maluka
b70f0eb113
Add onAnyEvent callback (#3244)
Implement a radical approach to improving abilities of plugins to detect
and handle various changes of micro's state: add onAnyEvent callback
which is called, literally, after any event. A plugin can use this
callback to compare a state after the previous event and after the
current event, and thus is able to catch various events that cannot be
detected using other callbacks.

Some examples of such events:

- change of current working directory
- switching cursor focus between a bufpane and the command bar
- change of message text in the status bar
2024-05-14 18:01:15 +02:00
Dmytro Maluka
5a159ce444 updateDiffSync(): fix potential race
When updateDiffSync() is called asynchronously, it should lock the
line array when calling Bytes(), to prevent race if the line array is
being modified by the main goroutine in the meantime.
2024-05-12 21:07:12 +02:00
Dmytro Maluka
bca35a5939 Simplify UpdateDiff() interface
The callback passed to UpdateDiff() is superfluous: in the synchronous
case screen.Redraw() is not needed anyway (since the screen is redrawn
at every iteration of the main loop), and in the asynchronous case
UpdateDiff() can just call screen.Redraw() directly.
2024-05-12 20:05:14 +02:00
Jöran Karl
1f51d0b9e2
Merge pull request #3271 from JoeKar/fix/inactive-mouse-release
Fix lost mouse release events in case the pane becomes inactive
2024-04-27 23:22:57 +02:00
Jöran Karl
0a1447b688 action: tab: Stop resize in case of mouse release while not pressed 2024-04-27 21:38:02 +02:00
Jöran Karl
2ecdac8405 action: tab: Release mouse press in case of mouse release while not pressed 2024-04-27 21:37:59 +02:00
Jöran Karl
385437d400
Merge pull request #3266 from JoeKar/fix/keysequence-comparison
bindings: Correct `KeySequenceEvent` comparison (fix crash)
2024-04-26 17:37:19 +02:00
Jöran Karl
1c35f3dc39
Merge pull request #3261 from JoeKar/fix/command-term
action: Stop processing chained actions/commands in the moment the current `Pane` is not a `BufPane` (fix crash)
2024-04-26 17:36:12 +02:00
Jöran Karl
07cda68795 initlua: Correct return type of CurPane() to be of type *BufPane 2024-04-25 23:34:39 +02:00
Jöran Karl
3919cf399f action: Provide Name() to treat TermPane as Pane
This will add the capability to address the `TermPane` within the tabs, since
the tab list only stores panes.
2024-04-25 23:34:39 +02:00
Jöran Karl
b05df07df2 bindings: Small refactoring of TryBindKey() for better readability 2024-04-25 23:21:52 +02:00
Jöran Karl
8af890a0a3 bindings: Correct KeySequenceEvent comparison
We've to iterate over the included elements,
since slices can't be simply compared with the comparison operators.
2024-04-25 23:20:30 +02:00
Dmytro Maluka
ff5b147639
Merge pull request #3267 from dmaluka/dokeyevent-improvements
Small fixes and improvements for InfoPane's key event handling
2024-04-25 21:59:44 +02:00