Jöran Karl
58b6917526
command: Apply small cosmetics to openTerm()
2025-05-08 06:27:11 +02:00
Jöran Karl
63b6a1e6cf
command: Extract term() as dedicated openTerm() function
2025-05-08 06:27:07 +02:00
Jöran Karl
4769a94fb1
command: Exit loop in TermCmd() after terminal call
...
Otherwise the last opened pane is closed instead of the active one.
2025-05-07 19:33:31 +02:00
cutelisp
ca32ffbb4a
Change variable visibility ( #3720 )
...
Changed DoubleClick and TripleClick to public so they can be accessed by
Lua plugins.
2025-04-29 20:55:01 +02:00
niten94
c457ae421a
Generalize save prompt on close code into method
...
This slightly changes the open and term command to be similar with the
Quit action, where the buffer or pane is replaced after the prompts are
completed if "n" wasn't pressed after the 1st prompt.
2025-04-18 19:21:27 +08:00
niten94
0d5b2b73e3
Skip save on open or term command if buffer is shared
2025-04-18 19:19:19 +08:00
Mikko
79fe4ae3e3
fix cycling through completion suggestions ending in non-word character ( #3650 )
2025-04-15 21:02:41 +02:00
cutelisp
b88300ef7f
Fix comment ( #3716 )
2025-04-12 12:27:00 +02:00
niten94
f2454c9248
Specify tags where term emulation is unsupported
...
Copy build constraints in actions_other.go to terminal_unsupported.go,
to avoid maintaining separate build constraints that are similar with
terminal_supported.go.
2025-04-05 17:49:57 +08:00
niten94
a699cac3be
Support term emulation on solaris, netbsd, openbsd/*
...
Support terminal emulation on platforms below:
- Solaris
- NetBSD: Supported in creack/pty since v1.1.12
- OpenBSD with GOOS != amd64
- Other architectures are supported now in creack/pty
2025-04-05 17:49:57 +08:00
Dmytro Maluka
948b05745f
Fix remaining gofmt complaints
2025-03-24 23:04:06 +01:00
Dmytro Maluka
eadc402ae0
Import paths: fix non-alphabetic order
...
Make gofmt happy about that.
2025-03-24 23:01:48 +01:00
Dmytro Maluka
1bd86a8f79
Build constraints: switch to new syntax
...
Make gofmt happy about that.
2025-03-24 22:54:32 +01:00
Neko Box Coder
9003243178
Removing the use of SetName() for file buffers
2025-03-12 19:24:36 +00:00
Neko Box Coder
c9f12206e9
Updating SaveCmd to use saveBufToFile instead
2025-03-11 03:11:03 +00:00
Jöran Karl
49aebe8aca
save+util: Provide a meaningful error message for safe (over-)write fails
2025-02-28 18:57:53 +01:00
Jöran Karl
63d68ec441
bindings: Perform write process safe
2025-02-28 18:57:53 +01:00
Jöran Karl
1663a1a6e4
actions: Don't overwrite the buffers Path
...
This is fully handled within the buffers `save` domain.
2025-02-28 18:57:53 +01:00
Jöran Karl
6e8daa117a
ioutil: Remove deprecated functions where possible
2025-02-28 18:57:53 +01:00
Jöran Karl
18a81f043c
util: Generalize the file mode of 0666 with util.FileMode
2025-02-28 18:57:53 +01:00
Jöran Karl
5aac42dbe7
bindings: Convert os.IsNotExist() into errors.Is()
2025-02-28 18:57:53 +01:00
Jöran Karl
3fcaf16074
actions: SaveCmd: Print the error of SaveAs to the InfoBar
2025-02-28 18:57:53 +01:00
Jöran Karl
5c21241fc4
actions: SaveAs: Print the error of os.Stat() to the InfoBar
2025-02-28 18:57:53 +01:00
Jöran Karl
ddc6051b33
actions: Use SetOptionNative() instead of setting options directly
...
Setting options directly in (h.)Buf.Settings without calling SetOption() or
SetOptionNative() is generally not the best idea, since it may not
trigger the needed side effects.
In particular, after https://github.com/zyedidia/micro/pull/3343 ,
directly setting `diffgutter` and `ruler` causes them not being tracked as
locally overridden per buffer, so if we run the `reload` command,
it unexpectedly replaces them with the default ones.
2025-02-20 20:24:07 +01:00
Jöran Karl
e4b0ad7107
Merge pull request #3620 from JoeKar/feature/cursor-overwrite-indicator
...
statusline: Provide `overwrite` mode indicator
2025-01-31 17:59:36 +01:00
Neko Box Coder
dc18642985
Add missing resize in TabMove ( #3619 )
2025-01-28 21:04:05 +01:00
yz778
c02036e52f
Prompt to save or discard new files even with autosave enabled ( #3626 )
2025-01-25 20:24:31 +01:00
Jöran Karl
c61670e86f
buffer: Store the overwrite mode
2025-01-22 17:12:50 +01:00
matthias314
f5debdf8fe
ignore quoted and escaped characters when splitting keybindings into actions ( #3612 )
2025-01-20 20:28:38 +01:00
Jöran Karl
f49487dc3a
import: Use micro-editor/terminal instead of zyedidia/terminal ( #3600 )
2025-01-14 18:20:37 +01:00
Jöran Karl
2ddf461ad8
import: Use micro-editor/json5 instead of zyedidia/json5
2025-01-04 16:01:20 +01:00
Jöran Karl
6600430e88
import: Use micro-editor/tcell (legacy) instead of zyedidia/tcell ( #3593 )
2025-01-04 15:55:46 +01:00
matthias314
2898f1590d
made FindNext and FindPrevious work with empty matches ( #3572 )
2024-12-17 18:52:44 +01:00
matthias314
aa0fefcaa1
skip empty match right after previous match in ReplaceCmd ( #3566 )
2024-12-17 18:44:48 +01:00
matthias314
8cdf68bbf6
skip save dialog on quit if buffer is shared ( #3559 )
2024-12-09 19:42:19 +01:00
Jöran Karl
fb20818042
Merge pull request #3540 from JoeKar/fix/cursor-down
...
actions: Perform `Cursor(Page)Down` with selection like GUI editors do
2024-12-04 21:23:40 +01:00
Dmytro Maluka
71a26381c0
Fix unwanted view adjustment after page down ( #3555 )
...
Fix regression introduced while implementing nano-like page up/down in
commit b2dbcb3e : if the view is already at the end of the buffer and
the last line is even above the bottom, i.e. there are some empty
lines displayed below the last line (e.g. if we have scrolled past the
last line via the mouse wheel), pressing PageDown not just moves the
cursor to the last line but also unexpectedly adjusts the view so that
the last line is exactly at the bottom.
2024-12-03 21:07:30 +01:00
Jöran Karl
2c4754d484
actions: Prevent additional cursor move down on Cursor(Page)Down
...
This is needed to not move two lines below the last visual selection when it
has end behind the new line character.
2024-12-03 20:38:34 +01:00
Jöran Karl
50639015d7
cursor: Remove selection reduction by one character on Deselect()
2024-11-30 15:25:14 +01:00
Jöran Karl
3a16197da7
actions: On Cursor(Page)Down with selection of newline place cursor to start
2024-11-26 20:12:43 +01:00
Oleksandr Redko
b881bf5606
Remove unused internal or unexported functions ( #3481 )
2024-11-16 21:19:37 +01:00
Nimish Jha
b2dbcb3eab
implement nano-like page up/page down functionality
2024-10-29 10:22:35 +11:00
Dmytro Maluka
1ead9ce4fd
Fix regression in CopyLine, CutLine, DeleteLine for last line ( #3519 )
...
Fix regression introduced in commit fdacb28962 ("CopyLine, CutLine,
DeleteLine: respect selection"): when CopyLine, CutLine or DeleteLine is
done in the last line of the buffer and this line is not empty, this
line gets selected but does not get copied/cut/deleted (and worse, it
remains selected).
2024-10-24 18:01:45 +02:00
Nimish Jha
b3227d6049
add actions: CursorToViewTop, CursorToViewCenter, CursorToViewBottom ( #3506 )
2024-10-23 07:25:33 +02:00
Dmytro Maluka
8c0e0fa2ed
Make textfilter work with multicursors ( #3511 )
...
As requested in [1] and [2], change the `textfilter` command behavior to
apply the filter to the selections of all cursors, not just the 1st one.
[1] https://github.com/zyedidia/micro/discussions/3505
[2] https://github.com/zyedidia/micro/discussions/3510
2024-10-20 21:27:19 +02:00
Dmytro Maluka
f293f983bd
Merge pull request #3503 from dmaluka/spawcursorup-logical-lines
...
Revert `SpawnMultiCursor{Up,Down}` honoring softwrap + overhaul `LastVisualX` usage
2024-10-20 21:26:59 +02:00
Jöran Karl
39b2b2639a
action/command: Precise HelpCmd() documentation
2024-10-20 14:26:42 +02:00
Jöran Karl
47b84f75e1
config/settings: Add option helpsplit for permanent help split type
...
For downward compatibility the default split type for the `help` command
is set to be `hsplit`.
2024-10-20 14:26:42 +02:00
Jöran Karl
ff4c5c83f2
runtime/help: Align tab's documentation to vsplit
2024-10-20 14:26:42 +02:00
Jöran Karl
acabf2b492
action/command: Align vsplit & hsplit to tab's multiopen handling
2024-10-20 14:26:40 +02:00