Commit Graph
2338 Commits
Author SHA1 Message Date
69bccf6fcf docview: support gutter click selection, fixes #1116 (#1169)
* docview: support gutter click selection, fixes #1116

* Added missing call to parent on_mouse_pressed

Also fixed call to selections when `shift` is pressed.

* change to arrow instead of hand

Co-authored-by: Adam <adamdharrison@gmail.com>
2022-11-01 19:34:23 -04:00
GuldomanandGitHub ed226c476e Add more options to Scrollbar (#1174)
* Make `Scrollbar` accept a table for its options

* Add `force_status`, `{expanded,shrinked}_size` options to `Scrollbar`

* Add `Scrollbar:set_forced_status`

* Add `config.force_scrollbar_status` to force `DocView` scrollbars status
2022-11-01 18:38:50 -04:00
GuldomanandGitHub 0f160e614e Improvements to multicursor copy/paste (#1123)
* Add `Doc:get_selection_idx`

* Make multicursor paste add a cursor at the end of each paste

* Better manage paste of multicursor whole line copy

* Document `Doc:get_selection_idx`

* Keep track of last added selection in `Doc`

* Make use of `doc.last_selection` in `Doc` commands

* Make `Doc:get_selection` return the `Doc.last_selection` if possible
2022-11-01 18:16:39 -04:00
Guldoman b52fe1605e Make MacOS core:restart shortcut more in line with other platforms 2022-11-01 21:21:50 +01:00
Guldoman c512d01a68 Fix horizontal scroll with shift+scroll on MacOS
It seems like pressing shift+scroll on MacOS automatically makes it 
shift+horizontal scroll.
2022-11-01 21:20:37 +01:00
jgmdev a619054951 scripts build: properly detect if cross-compiling 2022-10-30 19:05:17 -04:00
Jefferson GonzálezandGitHub d89d1e6d98 ci release: add macos arm64 support (#1179) 2022-10-30 11:48:20 -04:00
Guldoman 8a9bac7de3 Fix drawwhitespace drawing lines with different substitution kinds
When multiple substitution kinds are present in the same line, they're 
placed in the cache in an order that's spatially consistent only between 
items of the same kind.
Because we stopped drawing after we reached the first invisible 
substitution, the subsequent kinds weren't drawn even if they should 
have been.
2022-10-30 02:54:30 +01:00
jgmdev 0030c69524 plugin autocomplete: update partial on manual trigger 2022-10-25 17:20:31 -04:00
jgmdev 3ccd696ffc plugin api: added missing param on lua_dump 2022-10-24 11:40:47 -04:00
Guldoman 715411061b Apply doc commands to anything that extends DocView
This fixes a regression caused by 
cf29a6a45f.
2022-10-24 04:47:26 +02:00
jgmdev 76f55aefe8 resources: .desktop inode/directory mime type
This allows associating lite-xl on linux with folders for the open with
option of graphical file browsers.
2022-10-22 21:10:45 -04:00
Jefferson GonzálezandGitHub af6c4bc152 core syntax: strip the path from filename on syntax.get (#1168) 2022-10-22 20:04:54 -04:00
Jefferson GonzálezandGitHub f02b3c46e6 Merge pull request #1167 from jgmdev/PR/new-lines
* plugin drawwhitespace: allow newline substitution
* docview: do not render newline fixes #1164
2022-10-22 19:56:43 -04:00
jgmdev 3da6833249 docview: do not render newline fixes #1164 2022-10-21 13:56:23 -04:00
jgmdev 261292c6aa plugin drawwhitespace: allow newline substitution 2022-10-21 13:53:42 -04:00
AdamandGitHub dd6eee1542 Fixed the common idiom of setting a plugin to true. (#1152) 2022-10-20 18:04:28 -04:00
TakaseandGitHub 437b954595 make the default core.ignore_files more specific (#1160)
* make the default core.ignore_files more specific

instead of blanket ignoring all dotfiles, we define a list of folders
and files to ignore. this makes the overall experience better.

* fix wrong path pattern

* add ignore_files to user init
2022-10-19 22:23:01 -04:00
jgmdev 3c752f86f3 core renderer: increased max font fallbacks to 10 2022-10-19 21:12:04 -04:00
jgmdev 1708462f4c core renderer: fixed small issue introduced on #1145 2022-10-19 21:11:29 -04:00
Adam 1c5936e697 Fixup minor drawing issue. 2022-10-18 16:01:32 -04:00
jgmdev 97ba91af8b changelog: added latest changes 2022-10-16 00:11:40 -04:00
Guldoman decbac4ac6 Check if scrollbar is no longer hovered on mouse release 2022-10-16 04:43:15 +02:00
Guldoman 6ca56fee1a Only consider left clicks on the scrollbar 2022-10-16 04:40:03 +02:00
jgmdev 5aaa5ab273 plugin lineguide: be strict on drawing to DocView 2022-10-15 21:56:34 -04:00
GuldomanandGitHub 6b754eb628 Refactor scrollbar into its own file (#1124)
* Move scrollbar to its own file
* Don't call `Scrollbar` functions if `View` is not scrollable
* Allow horizontal scrolling in `Scrollbar`
* Add horizontal scrollbar to `View`
* Add `root:horizontal-scroll` command with `shift+wheel` keymap
* Prioritize vertical scrollbar hover
* Don't send mouse movement to vertical scrollbar when dragging horizontal one
* Fix clicking on horizontal scrollbar track
* Implement `start` scrollbar alignment
* Add documentation to `Scrollbar`
* Make `DocView` infinitely scrollable horizontally
* Handle horizontal scroll SDL event
2022-10-15 20:12:15 -04:00
GuldomanandGitHub 5c2c95765e Add IME support (#991) 2022-10-15 19:58:51 -04:00
TakaseandGitHub 7107f88f9f save a reference to the font when calling renderer.draw_text. (#1156)
This prevents the GC from killing it.
2022-10-13 22:52:38 -04:00
jgmdev 42ac231f01 core utf8: fix license text 2022-10-13 11:29:37 -04:00
Jefferson GonzálezandGitHub f89088d0ec dirmonitor: add watch to subdirs on file limit mode (#1155) 2022-10-13 00:37:52 -04:00
JanandGitHub fb8bc08a67 allow defining the arch tuple via meson (#1153) 2022-10-12 18:33:10 -04:00
GuldomanandGitHub 334a7da5c9 Use the syntax with the longest match (#919)
This way, for example, a syntax that applies to `docker-compose.yml` 
files will take precedence over one that applies to `*.yml` files.
2022-10-12 18:10:11 -04:00
Jefferson GonzálezandGitHub 48c800cde7 dirmonitor: added missing mutex initialization (#1150) 2022-10-12 10:31:26 -04:00
Jefferson GonzálezandGitHub 0fc793d1ae Add on_scale_change event to View (#1146)
* core view: emit on_scale_change event
* core titleview: reconfigure hit_test on rescale fixes #1144
2022-10-11 14:44:32 -04:00
Jefferson GonzálezandGitHub 214c9d6287 dirwatch: exit coroutine if project not open anymore to properly gargage collect it (#1142) 2022-10-11 13:22:44 -04:00
jgmdev ec6d0532c8 release: linux build in ubuntu 18.04 fixes #1147
This change also properly fixes the double release creation issue due to
the upload files process not sepcifying the draft flag.

Also added update tag step so the tag gets updated to latest commit and
is easier to kick new builds for pre releases without having to create a
new release.
2022-10-11 00:02:12 -04:00
jgmdev 63885cb2d6 changelog: updated to include some of latest changes 2022-10-10 22:41:58 -04:00
Jefferson GonzálezandGitHub a7888e96ea Add fsevents backend to dirmonitor (#1141)
* dirmonitor: added backend reporting of watch mode

* dirmonitor: added fsevents backend for macos
2022-10-10 20:40:41 -04:00
TakaseandGitHub 34c4ac3cd5 add parameter validation to checkcolor and f_font_group (#1145) 2022-10-10 11:44:19 -04:00
TakaseandGitHub 3409929a0c draw lite-xl icon in TitleView (#1143)
the original hamburger menu icon is confusing. It is not a menu
and clicking it doesn't do anything. There is no reason why
we can't draw lite-xl's icon in place of that.
2022-10-10 11:05:30 -04:00
AdamandGitHub d1c74f529a Changed workspace to accommodate other views. (#1121)
* Added in the ability to pull scrolls from views, as all views have the capability of scrolling now.
2022-10-09 19:55:07 -07:00
AdamandGitHub dad0f79708 Fixed process layer argument quoting; allows for strings with spaces. And added ability to specify a literal, in the style of python. (#1132) 2022-10-09 19:53:48 -07:00
GuldomanandGitHub e7a575b4c4 Use relative mouse position directly for drop event (#1140)
Previously the relative position was calculated using the window 
position and the global mouse coordinates. In some systems like wayland, 
this operation returns incorrect values.
2022-10-09 20:13:51 -04:00
AdamandGitHub 9e816154ad Added in an additional ENVVAR for setting USERDIR, and also changed / to PATHSEP. (#1139)
* Added in an additional ENVVAR for setting USERDIR, and also changed / to PATHSEP.

* Forgot a /
2022-10-08 20:48:30 +02:00
Adam e34a3ca78f Stealthy fix of list_dir on windows with single letter directories. 2022-10-04 21:06:23 -04:00
AdamandGitHub 293110feaa Fix process api detach bug (#1137)
* Added in conditional, as detaching will fail with "Operation not permitted" on linux; setsid sets a new process group anyway.

* Added in variable to check detached state on cleanup, so we don't send TERM.
2022-10-04 20:02:22 -04:00
AdamandGitHub 1580d923d3 Fixing minor bug relating to TreeView's cache. (#1136)
Reviewed by Guldo; should fix things, merging.
2022-10-04 18:26:33 -04:00
JanandGitHub 630ab0ab92 Add i386 architecture detection, add FreeBSD to platform detection (#1135)
defining anything that isn't a specific set of architectures x86 is just wrong.
It should at least be called something non identifying like "native"

Lite-XL already builds for FreeBSD so add it to the platform detection
2022-10-04 11:13:21 -04:00
JanandGitHub 0277aaf079 meson: fallback onto the C compiler when Lua could not be found (#1134)
Lua provides no offical pkg-config configuration but some systems still have it.
Instead of assuming the System has none, try using the C compiler to find it.
This may give us an incorrect lua version, but its better than nothing at all.
2022-10-03 13:36:39 -04:00
Jefferson GonzálezandGitHub 3083f09fac meson: updated lua wrap to v5.4.4 (#1133) 2022-10-03 11:53:37 -04:00