Skyler Hawthorne
665286c199
factor new Application with file arg to function
2022-06-19 00:00:31 -04:00
Skyler Hawthorne
41bf1d5811
fix(command): write-quit: do not quit if write fails
...
During write-quit, if the file fails to be written for any reason, helix
will still quit without saving the changes. This fixes this behavior by
introducing fallibility to the asynchronous job queues. This will also
benefit all contexts which may depend on these job queues.
Fixes #1575
2022-06-18 23:57:47 -04:00
Skyler Hawthorne
fac36bc5ea
add test for write-quit happy path
2022-06-18 23:57:47 -04:00
Skyler Hawthorne
7c0bca186c
rename test helpers
2022-06-18 23:57:47 -04:00
Skyler Hawthorne
526c9be8ca
consolidate idle timer logic, make conditional
2022-06-18 23:57:47 -04:00
Skyler Hawthorne
374724f5ac
ignore failing write path tests until fixes are merged
2022-06-18 23:57:47 -04:00
Skyler Hawthorne
8d8d389536
rename top level module to satisfy cargo fmt
2022-06-18 23:57:47 -04:00
Skyler Hawthorne
acf931709a
use a read only file to ensure write failure
2022-06-18 23:57:47 -04:00
Skyler Hawthorne
ef8fe5a5ce
use system's appropriate line ending
2022-06-18 23:57:47 -04:00
Skyler Hawthorne
4e34ee7d2e
don't read from stdin for integration tests
2022-06-18 23:57:47 -04:00
Skyler Hawthorne
cb0440be85
use env var for integration test log level
2022-06-18 23:57:47 -04:00
Skyler Hawthorne
652cdda833
use test terminal backend for integration tests
2022-06-18 23:57:47 -04:00
Skyler Hawthorne
ed950fcc56
Add more context; Editor::open doesn't need to own path
2022-06-18 23:57:45 -04:00
Skyler Hawthorne
1533f48934
use Results in integration tests for more error context
2022-06-18 23:54:03 -04:00
Skyler Hawthorne
2386c81ebc
use idle timer instead of fixed timeout
2022-06-18 23:54:03 -04:00
Skyler Hawthorne
40120967e9
tests for buffer-close
2022-06-18 23:54:03 -04:00
Skyler Hawthorne
07fc80aece
tests for serialized writes
2022-06-18 23:54:03 -04:00
Skyler Hawthorne
ee705dcb33
use main application event loop
...
Use the Application's main event loop to allow LSP, file writes, etc
2022-06-18 23:54:03 -04:00
Skyler Hawthorne
36e5809f63
add test for ensuring the initial cursor on a newly opened file
2022-06-18 23:54:03 -04:00
Skyler Hawthorne
267605d147
reorganize tests into groups
2022-06-18 23:54:03 -04:00
Skyler Hawthorne
84bbe6b8f3
refactor helpers, use new test helpers
2022-06-18 23:54:03 -04:00
Skyler Hawthorne
0f3c10a021
Fix initial selection of Document in new view
...
When a new View of a Document is created, a default cursor of 0, 0 is
created, and it does not get normalized to a single width cursor until
at least one movement of the cursor happens. This appears to have no
practical negative effect that I could find, but it makes tests difficult
to work with, since the initial selection is not what you expect it to be.
This changes the initial selection of a new View to be the width of the
first grapheme in the text.
2022-06-18 23:54:03 -04:00
Skyler Hawthorne
502d3290fb
improve test harness
...
* Use new macro syntax for encoding sequences of keys
* Make convenience helpers for common test pattern
* Use indoc for inline indented raw strings
* Add feature flag for integration testing to disable rendering
2022-06-18 23:54:03 -04:00
Blaž Hrastnik
308cab3e5c
Integration testing harness
2022-06-18 23:54:03 -04:00
Blaž Hrastnik
adb6cd5376
Simplify handle_terminal_events signature
2022-06-18 23:54:03 -04:00
Skyler Hawthorne
0623a72599
move config parsing back into main
2022-06-18 23:54:03 -04:00
Gygaxis Vainhardt
debd2405d9
views -> buffers in write-all ( #2788 )
2022-06-16 16:09:30 -05:00
Bjorn Ove Hay Andersen
794576a5b0
Update auto-pairs and idle-timeout when the config is reloaded ( #2736 )
2022-06-15 22:59:58 +05:30
Frojdholm
402f285ba5
Improve markdown list rendering ( #2687 )
...
* Cleanup old commented code
* Implement line breaks in markdown rendering
* Implement markdown nested, numbered and multiparagraph lists
2022-06-15 13:20:19 +09:00
Roland Kovacs
c2cc2037b5
Better handling of symlinks ( #2718 )
...
- Add file-picker.follow-symlinks configuration option (default is true), this
also controls if filename and directory completers follow symlinks.
- Update FilePicker to set editor error if opening a file fails, instead of
panicing.
Fix #1548
Fix #2246
2022-06-15 13:17:17 +09:00
Ryang Sohn
3bd5545577
Add a check to prevent re-selecting same range ( #2760 )
2022-06-14 08:37:40 -05:00
Gokul Soumya
e9283b20b4
Add docstring for language_server!() macro ( #2750 )
2022-06-12 09:53:58 +09:00
Frojdholm
e0532771cc
Do not add extra line breaks in markdown lists ( #2689 )
2022-06-08 09:44:07 +09:00
Blaž Hrastnik
26dbdb70fb
Refactor push_jump so we're not needlessly fetching doc twice
2022-06-07 00:23:41 +09:00
Blaž Hrastnik
b14c258a2c
prompt: If submitting empty prompt, use default (last used)
2022-06-07 00:23:40 +09:00
Termina94
f1ae496860
Add shell insert commands to typable and config ( #2589 )
...
* Add shell insert commands to typable and config
* generate docs
Co-authored-by: Dean Revell <revell@gmail.com>
2022-06-05 19:52:41 +09:00
gavynriebau
b2bd87df81
Fix crash due to cycles when replaying macros ( #2647 )
...
In certain circumstances it was possible to get into an infinite loop
when replaying macros such as when different macros attempt to replay
each other.
This commit adds changes to track which macros are currently being
replayed and prevent getting into infinite loops.
2022-06-05 19:49:41 +09:00
Michael Davis
1c2aaf3baf
ensure :quit and :quit! take no arguments ( #2654 )
2022-06-05 19:48:16 +09:00
yzwduck
d24ca66dbb
Avoid modifying jumplist until jumping to ref ( #2670 )
...
When a goto command is cancelled, the jumplist should remain unchanged.
This commit delays saving the current selection to the jumplist until
jumping to a reference.
2022-06-05 19:44:55 +09:00
Kirawi
4f3d0a7706
append set_line_ending
to document history ( #2649 )
2022-06-02 10:46:53 -05:00
Blaž Hrastnik
378f438fb0
fix: lsp: be more defensive about URI conversions
2022-06-02 14:07:19 +09:00
Blaž Hrastnik
6de6a3edbb
fix: lsp: be more defensive about URI conversions
2022-06-02 14:07:19 +09:00
Ryan Russell
ae12c58f0f
Improve Readability ( #2639 )
2022-06-01 12:01:37 -05:00
fa2eeccc57
Fix unwrap error when undo after shell_append_output
( #2625 )
2022-05-31 23:08:16 +09:00
Blaž Hrastnik
370a16d0f0
Update to ropey 1.5
2022-05-30 12:29:07 +09:00
Blaž Hrastnik
10415a8069
Bump dependencies, allow retain_mut for now
2022-05-29 11:10:49 +09:00
dependabot[bot]
da29527258
build(deps): bump once_cell from 1.10.0 to 1.12.0
...
Bumps [once_cell](https://github.com/matklad/once_cell ) from 1.10.0 to 1.12.0.
- [Release notes](https://github.com/matklad/once_cell/releases )
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.10.0...v1.12.0 )
---
updated-dependencies:
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 21:25:47 +09:00
Daniel S Poulin
0c05447d49
Add shrink equivalent of extend_to_line_bounds ( #2450 )
...
* Add shrink equivalent of extend_to_line_bounds
* Add a check for being past rope end in end position calc
* Include the EOL character in calculations
* Bind to `A-x` for now
* Document new keybind
2022-05-22 10:33:11 +09:00
kyrime
bfc4ff4dcf
Add theme key for picker separator ( #2523 )
...
Co-authored-by: ky <>
2022-05-22 10:24:51 +09:00
Leoi Hung Kin
5c864922d8
Fix panic when reloading a shrunk file ( #2506 )
...
* fix panic when reloading a shrunk file
* linting
* use scrolloff
2022-05-22 10:24:32 +09:00