Commit Graph

1034 Commits

Author SHA1 Message Date
Adam Harrison 6915d86d59 Introduced the constraint that all cursors must be in order. 2021-06-18 17:33:55 -04:00
Adam Harrison b065b52067 Ensured that textual inputs sort cursors so that we don't get *real* weird behaviour. 2021-06-18 17:33:55 -04:00
Adam Harrison 0f229b039d Fixed merging. Fixed selection undo stack. 2021-06-18 17:33:55 -04:00
Adam Harrison c494d52caf Used an inappropriate function in a selection loop. 2021-06-18 17:33:55 -04:00
Adam Harrison d3b3f26316 Added in cursor merging behaviour. 2021-06-18 17:33:55 -04:00
Adam Harrison c6f7e473f0 That's what I get for not testing after a 'simple' refactor. 2021-06-18 17:33:55 -04:00
Adam Harrison 858f7a2a50 Added in missing boolean. 2021-06-18 17:33:55 -04:00
Adam Harrison 75658b4f3f Removed unecessary elses. 2021-06-18 17:33:55 -04:00
Adam Harrison 2475b1624f Fixed error. 2021-06-18 17:33:55 -04:00
Adam Harrison b42708fe56 Cleaned up functions. 2021-06-18 17:33:55 -04:00
Adam Harrison 316671e5b7 Fixed tabbing spaces. 2021-06-18 17:33:55 -04:00
Adam Harrison 6c0d124410 Allows for rectangular selections with ctrl; also fixed tabbing. 2021-06-18 17:33:55 -04:00
Adam Harrison 08ab6cba05 Added in multiple clipboard line buffers. 2021-06-18 17:33:55 -04:00
Adam Harrison a7f39017ff Fixed undo stack. 2021-06-18 17:33:55 -04:00
Adam Harrison 93670a314d Changed iterator behaviour to avoid allocating a closure each time. 2021-06-18 17:33:55 -04:00
Adam Harrison 37a3884ee2 Initial commit of multicursor. Next step is to investigate how multicursor works on various other IDEs and ape those. 2021-06-18 17:33:55 -04:00
cukmekerb e493fa1b0a clicking the empty space where the x was no longer closes the tab 2021-06-17 21:15:30 -07:00
cukmekerb e1d85af69b added config.tab_close_button option to hide X on tabs 2021-06-17 18:35:36 -07:00
Adam 5151e36981
Added in the ability to customize the config directory used with the environment variable XDG_CONFIG_HOME. (#271) 2021-06-17 23:15:08 +02:00
Adam bdc37f1f6c
Added in remove file function. (#272)
* Added in remove file function.

* Changed namespace of rename and remove (now delete).
2021-06-17 22:26:27 +02:00
Francesco Abbate 1ad4289e76 Do not try to update topdir folder in treeview
If the directory expanded is a project's top directory
do not attempt to update its content.

Fix again issue #275
2021-06-17 19:07:32 +02:00
Francesco Abbate b39db791f9 Do not duplicate RootView method in contextmenu
The method RootView:on_mouse_pressed was copied in the contextmenu plugin with
a small modification to intercept the mouse clicks of the active view.

This approach is problematic because a relatively large portion of code is
duplicated.

We introduced a function named RootView.on_view_mouse_pressed to let plugins
like contextmenu intercepts mouse clicks in the active area without duplicating
the function RootView:on_mouse_pressed.
2021-06-17 10:22:31 +02:00
jgmdev e070dbebc1 Fix undeclared NagView findindex() by moving it to common. 2021-06-13 21:28:29 -04:00
Francesco 98164f6d4f
Integrate mkdirp function in common module (#265)
Move the function mkdirp into common to be generally available.

Use the new common.mkdirp from create_user_directory() from
core/init.lua replacing previous parent directory creation code
within the function.

The previous mkdirp function did not work on Windows where
absolute paths starts with a drive letter. The code from
create_user_directory() did not have this problem but was wrong
in the way it was creating the nested directories.

The new implementation in common.mkdirp fix both problems.
2021-06-13 19:50:42 +02:00
Jefferson González 9823da8531
Merge pull request #267 from jgmdev/nagview-fix
Added missing NagView dialog commands to startup.
2021-06-12 23:14:17 -04:00
Adam Harrison 66b76f15c2 Added a check for duplicate tabs, also ensured that the appropriate view is set as active. 2021-06-12 14:24:31 -04:00
Adam Harrison a18eeafbc8 Added in some more checks. 2021-06-12 13:43:58 -04:00
Adam Harrison f729d7d008 Allows you to drag nodes around splits. 2021-06-12 13:43:58 -04:00
Francesco Abbate 752ecd5ece Group mouse move events from C API function
Groups together consecutive mouse move events like done in core.step()
lua function but on the C side.

It does not introduce any meaningful speedup but it theory is more efficient and
simplifies the Lua code.

The simplification of the Lua code alone is enough to justify this change?
2021-06-11 15:00:18 +02:00
jgmdev 9153f5695d Added missing NagView dialog commands to startup. 2021-06-09 20:13:23 -04:00
Björn Buckwalter 702ab2625c
MacOS modifier key adjustment (replace `alt`) per #262 (#263)
* Use `cmd` as modifier key for tab seletion (macos)

Part of #262.

* Use `cmd+shift` instead of `alt` on macos

Fixes #262.
2021-06-09 20:23:40 +02:00
Björn Buckwalter ef48d5d48c Use `ctrl` for next tab on macos
Fixes #261.
2021-06-08 16:13:00 +02:00
Takase 0fd1fa8872
Commands refactor (#257)
* remove unecessary check

* move command registration to core/commands
2021-06-07 23:00:29 +02:00
Takase 130b29438a
Allow creation of nested directories (#254)
* allow nested directories to be created

* fix / be turned into //

* refactor error handling

* refactor path splitting and mkdir calls

If a path exists it will now return immediately.

* fix typo

* remove possible trailing empty string

* fix bugs with path check
2021-06-07 22:44:35 +02:00
Adam Harrison 2170ab9649 Apologies for the subpar previous commit. This fixes the bugs in that one. 2021-06-05 00:50:25 -04:00
Adam Harrison 090d67f252 Exposed indent function, and made it more flexible. 2021-06-05 00:44:35 -04:00
Adam Harrison 3b816a2b4a Changed regex error handling, so that errors can be handled gracefully in lua, and made it so gsub returns the exact matches and replacements. 2021-06-04 23:58:17 -04:00
Francesco b046afccf9
Scale fonts context menu (#246)
* Retrieve scale plugin from lite-plugins

* New implementation of scale plugin and font C API

Introduce two new C API functions, renderer.font.get_size and set_size
respectively to get the font size and to set the size to a new value.

Using these functions we don't need to know the name of the font but
we can just change their size.

Adapt the scale plugin to use the new C API function with minor adaptations
in the logic.

Use smaller step to scale fonts.

Rename font_desc_free function, previous name was misleading as only the cached
resources are freed.

* Add contextmenu plugin from takase

From https://github.com/takase1121/lite-contextmenu

Adapted to show font scaling commands and find/replace commands.

i#	testing.lua

* Fix the cursor flickering with contextmenu

To avoid flickering of the cursor when using the context menu
we add a new function `core.request_cursor` that just take note
of the cursor requested.

The cursor will be actually changed only in root_view:draw() method
only when all the drawing operations are done. This means the cursor
will be changed only once per frame and only the most recent cursor
change request will take effect.

* Remove unneeded scale plugin return functions
2021-06-03 22:49:37 +02:00
Adam 248d70a8ca
Add PCRE to support regular expressions
Use regular expressions instead of Lua patterns for find and replace editor commands.

Syntax files can now use regex or Lua patterns as before keeping backward compatibility for plugins.
2021-06-02 21:27:00 +02:00
lqdev ea5e9b0ce5 fixed broken Doc:save monkeypatch 2021-06-02 19:11:59 +02:00
Francesco Abbate 4e93eabbac Deprecate core.add_save_hook to override Doc:save
In order to stay simple and closer to the lite's design principles we
deprecate the core.add_save_hook function and the related mechanism.
Instead we now directly override the Doc:save() method.

The method is already overrided from core.init to add the automatic
reloading of style when user's module is saved.

The cleanup is related to the discussion in issue #229.
2021-05-31 09:41:37 +02:00
Francesco Abbate 6d044224c1 Starts maximized only if it was in previous session 2021-05-28 16:35:25 +02:00
Francesco Abbate f7e3e41ab1 Fix problem with mouse cursor over dividers 2021-05-28 15:35:46 +02:00
redtide 818a7abb0a Avoid to restore window size when maximized (#226) 2021-05-28 08:51:39 +02:00
Adam 4ffb5e3672
Fixed commenting and uncommenting. (#224) 2021-05-28 08:17:49 +02:00
Francesco Abbate 34e38dd04a Fix missing check for filename when saving a file
Close #225
2021-05-27 18:53:31 +02:00
Francesco Abbate ad7d17caca Use FiraSans regular for UI 2021-05-27 13:49:33 +02:00
Francesco Abbate fe828b6ed9 Update changelog and release number 2021-05-27 13:46:51 +02:00
Francesco Abbate 934f12cded Fix bug with titleview close button not working
The bug was actually due to a presence of a ghost tab scrolling button
in all the views.

We need to check if the node has multiple views, if not there are no tabs
and therefore no scrolling button areas so we return nothing from the
method Node:get_scroll_button_index().

Close #216
2021-05-27 09:02:19 +02:00
Janis-Leuenberger 1394c53dbc
Improve user feedback for big directories (#223) 2021-05-27 08:28:58 +02:00
Adam Harrison f1a4bf8218 Changed to multiline select. 2021-05-26 17:52:01 -04:00
liquidev cb610055d0
support for font changing in the syntax highlighter 2021-05-26 19:16:56 +02:00
Francesco Abbate 10fde6e264 Implement lazy loading of directories
When the number of files in a project directory is above the max
limit switch back to a mechanism to read directory content only
when the corresponding folder is expanded in the treeview.

When the command core:find-file is invoked the command core:open-file
is executed instead because the complete list of the project's
files is not available.

When a project search is done we search through all the files within
the project dir without indexing them.

Address issues #217 #203 #183.
2021-05-26 14:22:10 +02:00
Adam Harrison 8acb3fae8c Fixed minor error that occurs when saving as after viewing a non-doc tab. 2021-05-24 17:26:16 -04:00
Francesco Abbate f17f5a4d6d Fix problem with filenames missing normalization 2021-05-24 15:58:49 +02:00
Francesco Abbate 739763675e Check the real absolute path of user module
Close issue #212
2021-05-22 23:32:45 +02:00
Francesco Abbate 217360ed31 Switch to FiraSans and JetBrainsMono fonts 2021-05-22 15:09:54 +02:00
Adam a254d393db
Indent Enhancements (#202)
* Indent enhancements.

* Fixed to match style guidelines.

* Added in useful explanatory comment.

* Changed which selection we're using, as we don't want this kind of wrapping to happen.

* Fixed bug involving lines full of whitespace.

* Removed unecessary commit.

* Actually reverted function, so that we don't screw up commenting.

* Fixed hard tab issue.
2021-05-22 15:01:19 +02:00
Francesco Abbate abc69a7a19 Prepare release 1.16.10 2021-05-22 14:55:58 +02:00
Adam 949692860e
Tokenizer cleanup (#198)
* Cleaned up tokenizer to make subsyntax operations more clear.

* Explanatory comments.

* Made it so push_subsyntax could be safely called elsewhere.

* Unified terminology.

* Minor bug fix.

* State is an incredibly vaguely named variable. Changed convention to represent what it actually is.

* Also changed function name.

* Fixed bug.
2021-05-20 21:58:27 +02:00
Francesco Abbate a02691f18e Merge topic branch for tabs scrolling buttons 2021-05-19 22:59:29 +02:00
Adam b278306fc9
Changed deindent, so that if the deindent runs into an unusual line with a partial indent at the front, it'll still de-indent that. (#193) 2021-05-19 22:41:28 +02:00
liquidev 86a7037ed9
support for multiple groups in one pattern (#196) 2021-05-19 22:35:28 +02:00
Francesco Abbate a92d15fe30 Use all the available space for tabs
Use a tab's width larger than style.tab_width if there is enough
available space to display the number of tabs specified in
config.max_tabs.
2021-05-19 10:09:40 +02:00
lqdev ba4fbde33d fixed mixed indentation 2021-05-18 17:52:18 +02:00
Francesco Abbate 1fb01f36df Avoid overflowing tab rectangles when animating 2021-05-17 15:11:06 +02:00
Francesco Abbate 13529c28d4 Cosmetic variable name change 2021-05-17 13:37:05 +02:00
Francesco Abbate ba40bc0dfc Final adjustments to tab's rect computations 2021-05-17 12:14:01 +02:00
Adam e43f1b9df9
Unified open and saving style. (#189) 2021-05-17 09:29:51 +02:00
Adam c7b1a6f53e
Allowed for optional boolean to better match filenames. (#180) 2021-05-16 19:23:17 +02:00
Francesco Abbate b37c190db2 Add buttons to scroll tabs when there are too many
Use config.max_tabs to configure the maximum number of tabs that can
be shown. Beyond the maximum value scroll buttons will appear to scroll
the tabs.
2021-05-16 15:50:27 +02:00
Francesco Abbate 90e41daa99 Add tab animation and improve hovering update
Always update the tab hovering status using the Node:update
method. Previous behavior was to update only on mouse moved
events.
2021-05-15 16:57:20 +02:00
Francesco Abbate b223dbca6f Use unicode ellipsis to truncate tab's text
For proportional fonts is equivalent to three dots but it makes a
lot of difference for monospaced fonts.
2021-05-15 16:27:29 +02:00
Francesco Abbate f30dfc20fe More accurate tab width calculation
Ensure the right side of the right-most tab always end up at the
same position.
2021-05-15 16:26:15 +02:00
Francesco Abbate 50a4fc212f Do not truncate filenames in tab and use dots 2021-05-15 14:49:16 +02:00
Francesco Abbate e2fcc41b4a Ensure tabs don't extend beyond window's width 2021-05-15 14:17:36 +02:00
Francesco Abbate e58d7600ee Prepare release 1.16.9 2021-05-06 17:08:56 +02:00
tsukanov-as f637dc4db8
Fix creating a new file (#179) 2021-05-06 16:53:46 +02:00
Francesco Abbate 55a6888818 Fix resizing problem for nested nodes
Should fix problem reported in:

https://github.com/drmargarido/TodoTreeView/issues/3
2021-05-06 15:35:40 +02:00
Francesco Abbate 5cef643e02 Introduce new plugin versioning tag mod-version
New plugins should use the version tag:

-- mod-version: 1

The old version tag "-- lite-xl 1.16" will be considerer equivalent
to mod-version 1.
2021-05-05 22:38:29 +02:00
Adam 135dfa6f03
Add a more explicit message in log and config.max_project_files
* Added a line to avoid people going down the rabbit hole that I did.

* Further explanatory text.
2021-05-05 16:00:17 +02:00
Francesco Abbate 9f7f55926b Use home_encode when setting window title to filename 2021-05-05 10:35:19 +02:00
Francesco Abbate d63afe02ed Use string.find only in common.home_encode
Should be slightly more efficient.
2021-05-05 10:34:48 +02:00
Francesco Abbate 820d520fc3 Store doc's babs_filename without home encoding
This is the way was supposed to be. All the filenames are supposed to be
stored without home encoding, i.e. with explicit paths.

Should fix issue #177 and make PR

https://github.com/franko/lite-xl/pull/174

unneeded.

It may also address issue #174 but would need further verifications.
2021-05-05 08:52:14 +02:00
Adam 4c42dd4adc
Do not close command view on open-file is file is invalid or it is a directory
Added in a validation function which fires before submitting a command enter; found it incredibly irritating to try to open something, hit enter, only to be told I'd selected a directory, and then have to go through the whole process again. (#175)
2021-05-05 08:04:51 +02:00
Adam 67ec7e8065
Added in drag and drop capability. (#170) 2021-05-02 09:13:21 +02:00
Francesco Abbate b42d9de0be Prepare 1.16.7 release 2021-05-01 23:18:16 +02:00
Adam e4da235f7e
Made it so that you can continue clicking and still select things. (#166) 2021-05-01 22:32:50 +02:00
Adam dd604c1336
Nil check, to avoid issues for files that don't have filenames yet (new files, etc..) (#169) 2021-05-01 22:25:39 +02:00
Francesco Abbate 1a05e00fdd Fix detection of user file module
Close #54
2021-05-01 19:27:29 +02:00
Francesco Abbate e6d88909a8 Fix log message about project dir 2021-05-01 19:27:29 +02:00
Francesco Abbate 5766329313 Fix filename problem
Close #163
2021-05-01 19:27:29 +02:00
Francesco Abbate 857807b23a Use ab filename as initial text for open file command 2021-05-01 19:27:29 +02:00
adamharrison 3fe6665b9a
Nested Syntax Highlighting (#160) 2021-05-01 11:45:30 +02:00
adamharrison 2e7817f609
Use the active view's filename when opening a file 2021-04-25 20:58:56 +02:00
lqdev c859498d68 check version in init.lua within directory plugins 2021-04-25 19:14:36 +02:00
lqdev 34e94bb8aa fixed versioning, again 2021-04-25 12:35:00 +02:00
lqdev 5e8e2f54b5 directories should not be loaded 2021-04-25 11:45:08 +02:00
Francesco Abbate dd9b4f06ab Fix keymap binding on macos 2021-04-21 01:42:56 -07:00
Francesco Abbate 9d9c7f291c Make control to cmd translate on macos automatic 2021-04-21 10:16:51 +02:00
Francesco Abbate 80192573da Add macos keybindings
Thanks to @mathewmariani, modifications taken from his lite-macos repository
2021-04-21 09:48:30 +02:00
Francesco Abbate f50728bf18 New version tag 2021-04-21 09:05:51 +02:00
Francesco Abbate 2c8e723c6d Disable borderless window by default 2021-04-21 09:05:15 +02:00
Francesco Abbate 8bcace1d59 Merge remote-tracking branch 'origin/border-less-window' 2021-04-21 08:42:57 +02:00
Francesco Abbate 53f77a29ea Implement correctly loading from macos bundle resources 2021-04-18 08:51:31 -07:00
Francesco Abbate 032018ec48 More aggressive wait_event timeout when window has focus
Adopt a time based logic for cursor blinking and wait for event

when idle with a timeout equal to blink remaining time.
2021-04-17 14:57:28 -07:00
Francesco Abbate f7375924ab Make non-borderless mode work 2021-04-12 19:05:30 +02:00
Francesco Abbate 4de97d51fb Avoid always calling system.get_window_mode 2021-04-12 13:31:32 +02:00
Francesco Abbate 46791aefe5 Implement maximize/restore controls
Remove also resize from top and right of the window
2021-04-12 11:54:52 +02:00
Francesco Abbate 67dc16ad26 Make windows control buttons active 2021-04-11 23:52:31 +02:00
Francesco Abbate 8ad87d77da Add correct hit-test information and menu icon 2021-04-11 15:08:25 +02:00
Francesco Abbate 7531a0ddc8 Preliminary implementation of border-less mode
Not yet functional but most ingredients are there
2021-04-10 19:35:57 +02:00
Francesco Abbate f250adcda1 Implement multi-lines for NagView
Related to issue #147
2021-04-07 23:46:45 +02:00
Francesco Abbate 119f406d3c Add NagView message for refused plugins 2021-04-07 09:42:19 +02:00
Francesco Abbate d7cc1f9f9d Add plugin verification by version tag 2021-04-06 17:50:46 +02:00
Francesco Abbate 3721ace099 Fix logical error in on_text_change 2021-04-06 08:26:53 +02:00
Francesco Abbate e43c980e4a Simplifies previous commit
Restore the previous signature of raw_insert/remove
2021-04-06 08:18:35 +02:00
Francesco Abbate d1984942ea Add hook function for Doc changes 2021-04-05 00:11:56 +02:00
Takase 63b9cf223e
NagView improvements (#136)
Implement keyboard commands for the NagView.
2021-04-04 16:11:47 +02:00
Francesco Abbate 3b040aabc7 Implement unicode character replacements
Useful to draw whitespaces with alternate characters and colors
without slowing down the text rendering.

A new API is implemented. A renderer.replacements object can be created
to list the replacements.

In turns the function renderer.draw_text and draw_text_subpixel now accept
two optional arguments for replacements.
2021-04-01 18:05:59 +02:00
Francesco Abbate 15a4985065 Prepare release 1.16.5 2021-03-20 22:31:45 +01:00
Francesco Abbate 60fa7d07ba Prepare 1.16.4 release 2021-03-20 17:10:27 +01:00
Francesco Abbate f9115751b4 Minor simplification of animation rate adjustment 2021-03-20 17:00:43 +01:00
Francesco Abbate 7f50df6a2f Ensure plugin within a directory are loaded
Close #118
2021-03-20 16:34:00 +01:00
Francesco Abbate 26ec9e5820 Compute animation rate only if needed 2021-03-18 16:20:21 +01:00
Francesco Abbate 04063ff47e Fix error introduced with commit c0ad86d 2021-03-18 15:46:44 +01:00
Francesco Abbate 88bec172a1 Fix problem with tab size and subpixel positioning
Solve github issue https://github.com/franko/lite-xl/issues/109
2021-03-18 13:54:33 +01:00
Takase c0ad86de8c
integrate NagView 2021-03-13 12:57:52 +01:00
liquidev 844ecd1f26
Make animation speed independent of config.fps, add config.animation_rate to fine-tune animation speed (#93)
* animation rate config field

* @franko's math magic to make it look more correct
2021-03-10 16:35:37 +01:00
liquidev 3af6af654b
more stylish tabs (#95) 2021-03-09 14:24:14 +01:00
Francesco Abbate b612357371 Bump new version number 2021-03-07 18:47:15 +01:00
Francesco Abbate baf5aebe1c Merge remote-tracking branch 'origin/master' into subpixel-font-positioning-fix 2021-03-07 12:25:53 +01:00
Francesco Abbate 23a053e1ee Ensure error and stack trace are written to stdout
To address https://github.com/franko/lite-xl/issues/87
2021-03-07 09:48:44 +01:00
Francesco Abbate 199476547b Fix error related to panes resize along y 2021-03-06 23:50:19 +01:00
Francesco Abbate 991db14877 Ensure filename are store relative to project directory 2021-03-06 23:49:20 +01:00
Francesco Abbate 5bf7abf23d Ensure filename are store relative to project directory 2021-03-06 23:36:05 +01:00
Francesco Abbate 087c8ba402 Fix error related to panes resize along y 2021-03-06 23:05:04 +01:00
Francesco Abbate 3426bc5d73 Introduce subpixel text positioning within rencache
In order to fix the issue with cursor positioning a subpixel-aware draw
text operation within rencache was required.

With this modification the cursor positioning problem is completely
resolved.

A new function renderer.draw_text_subpixel is introduced to perform
consecutive, inline, text drawings with subpixel accuracy.
2021-03-06 18:12:02 +01:00
Francesco Abbate 9ff6a0325e Mostly fix problem of offset with cursor positioning when using mouse
In order to get right the cursor position on text on mouse clicks it is
needed to take into account text's subpixel positioning.

This fix mostly corrects the problem but cursor positioning is still
somewhat inaccurate for long lines due to repeated commands to draw a text
along a line. Repeated draw text calls make the subpixel information
lost and small errors will add-up.
2021-03-06 16:18:24 +01:00
daubaris 0cb594aaf2
Enable customizing cursor speed (#80)
Addresses issue #65
2021-03-06 11:03:12 +01:00
Francesco Abbate aa1408c01f Do not assume doc.indent_info is present 2021-03-05 23:47:36 +01:00
Francesco Abbate 09332fe242 Fix problem with fatal error message
Previous implementation was broken.

Ensure the error file is always written and write its location in the error message
2021-03-05 23:46:41 +01:00
Francesco Abbate 877e4ac6e2 Bump new version 2021-03-05 11:33:29 +01:00
Francesco Abbate a4bc8986ff Implement fatal error message box
Used when lite-xl fails at startup
2021-03-05 10:33:50 +01:00
Francesco Abbate 3506ff47fc Fix problem with plugin loading
Introduced with PR https://github.com/franko/lite-xl/pull/73
2021-03-05 07:22:56 +01:00
Francesco Abbate de13762085 Show complete tab name when close butto is not there 2021-03-03 18:48:41 +01:00
liquidev 2e1a6ad5d1
Fix #30 – user plugins take priority over built-in plugins (#73)
user plugins should take priority over stock plugins
2021-03-03 12:20:22 +01:00
Francesco Abbate 8883685eea Fix font size in initial user's config 2021-03-01 09:48:12 +01:00
Francesco Abbate c0942bbde7 Use slightly larget font for UI 2021-02-28 23:44:35 +01:00
Francesco Abbate 75eadf4dc7 Simplifies logic for suggestion's offset 2021-02-28 23:24:19 +01:00
Francesco Abbate e46800347f Implement scrolling in command view 2021-02-28 19:52:38 +01:00
Francesco Abbate a35ef764a0 Show Lite XL instead of lite in window's title 2021-02-28 18:55:05 +01:00
Francesco Abbate 6c84913f6a Do not set window's title to unsaved for command view 2021-02-28 18:54:32 +01:00
Francesco Abbate bd2d8db231 Draw divider for inactive tabs 2021-02-27 23:56:11 +01:00
Francesco Abbate f708a53a04 Keep active view when closing inactive tabs 2021-02-27 23:55:36 +01:00
Francesco Abbate e861ea1d66 Ensure tab's text and close button don't overlaps 2021-02-27 17:19:47 +01:00
Francesco Abbate 4cda8fc122 Show tab close button when hovering inactive tabs 2021-02-27 15:29:18 +01:00
Francesco Abbate ca6d1843bc Implement close button for tabs 2021-02-27 13:53:52 +01:00
Francesco Abbate 0dc18de6bc Add information about icon_big_font in initial user's configuration 2021-02-27 12:13:51 +01:00
Francesco Abbate 4d734e933c Fix resize behavior of treeview and toolbar
Now toolbarview always compute up-to-date sizes and spacing to adapt to
changes in icon big font.

For treeview and toolbarview revert the goto_size approach to use the
original approach of rxi/lite. In order to make it work when user resizes
dragging the divider we use the view optional method set_target_size().
This latter changes the view's target size instead of changing its size
right away. The size is only changed by the lite's layout and animation
system.

Remove the config.treeview_size variable that was no longer working because
plugins are loaded before the user's config.
2021-02-27 12:13:11 +01:00
Francesco Abbate af0be4abf1 Update changelog and version 2021-02-25 09:37:06 +01:00
Francesco Abbate 94b99b658e Fix multi-line commands
When second position is at the beginning of a line do not include this latter.
2021-02-24 18:06:47 +01:00
Francesco Abbate 351a772466 do not use 'portable' as a compile time option
Introduce the file core/start.lua to initialize applications variables
2021-02-24 16:29:39 +01:00
Francesco Abbate fc46946ea1 Fix the flashing tooltip issue 2021-02-21 11:09:51 +01:00
Francesco Abbate 2353076b37 Add config.transitions to enable/disable transitions 2021-02-21 11:08:25 +01:00
Francesco Abbate 5e0dee3e18 Fix indent spaces/tabs labeling 2021-02-20 22:56:52 +01:00
Francesco Abbate 054350263d Fix treeview missing clamp bug
Github issue: https://github.com/franko/lite-xl/issues/44
2021-02-20 20:13:25 +01:00
Francesco Abbate 4f2e38d41f Make code and ui font smaller at 12 2021-02-19 16:23:19 +01:00
Francesco Abbate 688dc1a7b8 Do not log every plugin load
Since we now load the user's module before the plugins\nwe avoid to log a line for each loaded plugin to not hide\nan eventual error in the user module
2021-02-19 16:12:56 +01:00
Francesco Abbate 68d9794926 Adjust default code font size
The previous value looks too big in hidpi screens
2021-02-19 16:10:57 +01:00
Francesco Abbate 76b463bd11 Create empty fonts directory in USERDIR 2021-02-19 16:10:02 +01:00
Francesco Abbate 0233941fe9 Bump version number 2021-02-19 13:54:10 +01:00
Francesco Abbate 2a0846b604 Automatic keep adjusting indent size
When too few lines keep adjusting indent size
2021-02-19 11:51:49 +01:00
Francesco Abbate ef24828307 Add toolbar tooltips 2021-02-19 11:50:20 +01:00
Francesco Abbate 6353fde609 Move user module loading before plugins
Otherwise the configuration to disable a plugin does not take effect.
2021-02-19 10:08:03 +01:00
Francesco Abbate 114f6b2481 Do not print error on standard output
Delayed error when passing invalid directory argument.
2021-02-19 09:29:46 +01:00
Francesco Abbate ba68d6db24 Improve error handling for directory arguments 2021-02-19 00:15:55 +01:00
Francesco Abbate a2c4fdf649 Normalize global PATH from core.init 2021-02-18 09:02:57 +01:00
Francesco Abbate de1afb3391 Add full filename path in window's title
Optimal implementation to limite computations in core.step.
2021-02-18 00:26:19 +01:00
Francesco Abbate 59fbf9cfc0 Merge branch 'master' into dev 2021-02-17 23:57:02 +01:00
Francesco Abbate 9b27180267 Use doc on_save hooks to reload user module 2021-02-17 20:10:39 +01:00
Francesco Abbate 1ce1c114ba Fix reload module problem on windows 2021-02-17 19:20:00 +01:00
Francesco Abbate 6369a7f760 Use tilde expansion when running save-as command 2021-02-16 22:54:00 +01:00
Francesco 1decf67b64
Merge pull request #34 from budRich/user-module-auto-reload2
User module auto reload
2021-02-16 20:52:06 +00:00
bud 63b024cb81 FIX: Use PATHSEP instead of hardcoded "/" path separator 2021-02-16 19:25:40 +01:00
bud 4917be3daf remove config for window title format 2021-02-16 19:13:41 +01:00
bud 3693556958 FIX: get DocView in init instead of step, remove option for window title format' 2021-02-16 19:12:56 +01:00
Francesco Abbate 9fced84a7a Move VERSION variable into Lua code
To avoid recreating binaries if there are no changes
in the C side of the source code.
2021-02-16 14:35:02 +01:00
bud dd30725d84 FIX: before setting full path to window title, make sure activeView is DocView 2021-02-15 22:38:29 +01:00
bud b9fcb6e5ae ADD: test in doc:save(), if the file is the user module, automatically reload config 2021-02-15 22:09:25 +01:00
bud cc9aa23340 REMOVE: dont add reload on save hook in core:open-user-module, its automatically done in doc:save() 2021-02-15 22:09:06 +01:00
bud 7e3eb4a408 ADD: default value (false) for full_path_in_window_title 2021-02-15 21:06:03 +01:00
bud 436446dd9a ADD: in core.step() show full path if view is a document and config.full_path_in_window_title is true 2021-02-15 21:05:06 +01:00
Francesco Abbate 680058547d Replace icons font with new fontello font 2021-02-15 15:49:33 +01:00
Francesco Abbate ebba21310b Fix treesize toggle command and transition 2021-02-15 12:18:43 +01:00
Francesco Abbate b836c2e1e6 Implement proper layout of toolbar 2021-02-15 00:36:39 +01:00
Francesco Abbate 2765cbd92b Show a dummy toolbar
Does not do anything for the moment
2021-02-12 15:54:11 +01:00
Francesco Abbate 9f0abd1a8b Show resize cursor only when panes are resizable 2021-02-11 17:15:27 +01:00
Francesco Abbate f482ea318a Makes resizable attribute explicit in Node:split() 2021-02-11 16:12:21 +01:00
Francesco Abbate c6a1323214 More accurate implementation for x and y axis 2021-02-11 11:53:53 +01:00
Francesco Abbate e69d201e1b First preliminary implementation of treeview resize
Works but only cover resize along x.
2021-02-09 18:41:32 +01:00
Francesco Abbate a8c810d801 Merge remote-tracking branch 'origin/master' into dev 2021-02-09 18:39:39 +01:00
Francesco Abbate 3d8cf22933 Fix error with previous commit 2021-02-05 15:36:48 +01:00
Francesco Abbate 03818d13fd Fix error when using relative dir argument 2021-02-03 07:39:35 +01:00
B14CK313 65c7f666aa
Fixed path returned by temp_filename not writeable
The path returned by temp_filename was not writeable on UNIX (and possibly other OS). This lead to the gitstatus plugin not working.
The proposed change fixes this by using the USERDIR variable instead of EXEDIR
2021-01-22 02:10:24 +01:00
Francesco Abbate 08b010a2da Add command root:close-all 2021-01-13 16:51:42 +01:00
Francesco Abbate ef5e431a8b New feature to disable plugins from config
Disable trimwhitespace by default
2021-01-13 14:50:24 +01:00
Francesco Abbate fcf763fe9c Fix problem when project directory has a trailing slash 2021-01-10 12:56:15 +01:00
Francesco Abbate 7f9e4e4984 Do not error out when project directory is invalid 2021-01-10 11:50:15 +01:00
Francesco Abbate 9f0fa5121b Add keymap bindings for ctrl/shift insert commands 2021-01-06 15:16:43 +01:00
Francesco Abbate 431bf68e72 Fix missing gome expand in remove-directory command 2021-01-03 23:52:02 +01:00
Francesco Abbate 8d4ba0cb34 Fix behavior when selecting project directories 2021-01-03 15:35:35 +01:00
Francesco Abbate e548a6adb9 Fix directories management to always keep the project's directory 2021-01-03 12:02:07 +01:00
Francesco Abbate 850fcbf710 Add required normalize_path call 2020-12-31 12:32:41 +01:00
Francesco Abbate 2cdf674b97 Keep memory of window's size and position and restore them on start
Fix also a problem with directory path on windows.
2020-12-31 11:25:12 +01:00
Francesco Abbate 0ff61a30e1 Lite XL modification to welcome screen 2020-12-30 16:15:57 +01:00
Francesco Abbate c3f5d2c144 Fix problems with project files and project directories
Now treat coherently the case when the project directory is removed from
the project directories.
2020-12-30 14:53:50 +01:00
Francesco Abbate 7280ae47ab Fix missing absolute_path call in change-project-folder command 2020-12-30 14:40:03 +01:00
Francesco Abbate b91a84eb56 Fix project change and quit versus workspace plugin 2020-12-30 14:31:36 +01:00
Francesco Abbate 0e263af3c6 Create common.serialize function 2020-12-30 13:32:25 +01:00
Francesco Abbate f2faddbec7 Add command to create a directory in a new category "files"
Use the alt + (left click) is tree view to create a directory and
shift + (middle click) to remove a project directory.
2020-12-30 11:52:26 +01:00
Francesco Abbate b7168b5ebb Fix find in project problem with get_active_view 2020-12-28 23:35:52 +01:00
Francesco Abbate ddd56ec615 Add command to remove a directory from the project
In addition directories can be removed with a mouse middle-click in the
tree view pane.
2020-12-28 15:51:16 +01:00
Francesco Abbate c042bfc907 Change project files output to not include a prefix '/' in filename
It make sense to not put the initial '/' in the filename as the name
is relative to the top directory it belongs to.

By removing the the initial '/' in the filename we can re-introduce the
variable

core.project_files

to stay compatible with standard Lite. The project_files variable will
always point to the files table of the first entry of
core.project_directories.
2020-12-28 10:26:27 +01:00
Francesco Abbate 4e260cd03e Add a comment about a possible improvement 2020-12-27 18:33:34 +01:00
Francesco Abbate df74781da8 Fix project search and status view for new add directory feature 2020-12-27 18:28:21 +01:00
Francesco Abbate e4fa196b33 Finalize add project directory feature 2020-12-27 11:32:52 +01:00
Francesco Abbate 39181a56fd Use relative path for filenames in project directories 2020-12-27 09:47:58 +01:00
Francesco Abbate 5449781353 Minor cleanup to project directory stuff 2020-12-26 23:39:27 +01:00
Francesco Abbate 54518c438d Cosmetic changes to names from previous commit 2020-12-26 23:29:18 +01:00
Francesco Abbate ec730e9520 Test configuration with project_files stored separately for each directory 2020-12-26 21:22:57 +01:00
Francesco Abbate 2f50f21f57 Preliminary version of projects with multiple directories 2020-12-26 16:48:08 +01:00
Francesco Abbate 9e8e8f7543 Remove priority run mechanism 2020-12-26 11:30:20 +01:00
Francesco Abbate 9a12d47afd Add HOME directory expansion also for open file command 2020-12-20 00:31:49 +01:00
Francesco Abbate 4401f33c19 Move HOME expand/encode into common module 2020-12-19 23:53:29 +01:00
Francesco Abbate 35c87462a6 Use ~ for HOME directory in folder search 2020-12-19 16:31:42 +01:00
Francesco Abbate c3dd506bd7 Fix bug with lost primary node in rootview
It was possible to lose the primary node thus possibly preventing the
opening of new documents.
2020-12-15 13:30:49 +01:00
Francesco Abbate 499f085045 Use get_primary_node instead of Rootview:get_primary_view 2020-12-15 12:51:36 +01:00
Francesco Abbate eadbe41064 Add core.on_quit function for plugins
To be used for plugins like workspace from exi/lite-plugins
2020-12-14 13:57:24 +01:00
Francesco Abbate 3a38ded396 Use core.reload_module instead of style.load 2020-12-13 13:04:06 +01:00
Francesco Abbate 1fc0409163 Merge branch 'project-manager' 2020-12-12 20:27:07 +01:00
Francesco Abbate 3b30bfa18b Improve left/right scrolling behavior for DocView
With the new behavior when moving right and triggering a scroll in the
right direction a subsequent movement left do not longer triggers a
scrolling to the left.
The scrolling to the left happens only when needed for the visibility of
the current position.

In other terms with the old behavior the scrolling was purely a function
of the position and was adjusted even when not strictly needed for the
visibility of the cursor.
Now the scrolling is no longer a pure function of the position but it
has a "memory" behavior. The scrolling will be adjusted only if needed
to accommodate the position of the cursor.

Reduce also the width of the margin when the scrolling will be
triggered and calculate as a function of the font character width.

With the modification now Lite behaves like the other editors. In
addition the selection of text with the mouse is much more easy when
a scrolling of the line is needed.
2020-12-12 20:26:27 +01:00
Francesco Abbate 40ac899360 Restore core.quit and core.temp_filename to be compatible with Lite 2020-12-12 00:05:11 +01:00
Francesco Abbate 2373c63a0b Complete the initial user configuration file 2020-12-11 14:49:03 +01:00
Francesco Abbate 9114148b45 Automatically reload style when saving the project user module 2020-12-10 17:56:53 +01:00
Francesco Abbate 6409b67ea2 Add core:restart function to restart the editor 2020-12-10 12:44:01 +01:00
Francesco Abbate 33109e6110 Fix responsiveness problem of open-folder command 2020-12-09 15:45:16 +01:00
Francesco Abbate ebcfa63de1 Fix centerings of text in EmptyView 2020-12-08 23:36:50 +01:00
Francesco Abbate ba898b50fc Force a clear of treeview on switch project 2020-12-08 23:35:49 +01:00
Francesco Abbate 8448eee79f More accurate list of recent projects 2020-12-08 18:49:58 +01:00
Francesco Abbate f882957ebc Experimentally add priority run when scanning project files
Avoid yielding when a first scan is required but seems quite
ineffective.
2020-12-08 16:59:05 +01:00
Francesco Abbate e88adc0567 Move project manager into core init file 2020-12-08 16:57:57 +01:00
Francesco Abbate c0f0325bbb Fix behavior of project manager to store directories 2020-12-08 09:42:11 +01:00
Francesco Abbate a3adfeb8f6 Begin reworks of project manager 2020-12-07 18:06:58 +01:00
Francesco Abbate ebaa2b4f26 Fix bug related to creation of user's init file 2020-12-07 17:38:36 +01:00
Francesco Abbate ca9bf21819 Reword name for identifying primary view 2020-12-06 13:24:55 +01:00
Francesco Abbate 23575b309e Fix syntax error with previous commit 2020-12-06 11:37:05 +01:00
Francesco Abbate 1c4b8cf315 Fix documentation and behavior for 1.13 release 2020-12-06 11:23:33 +01:00
Francesco Abbate 745dd99e97 Use original document views node to open a new document
Used when the active view is a locked node.
2020-12-06 01:03:54 +01:00
Francesco Abbate 926e004c41 Preliminary version of project manager
Adapted from contribute rxi/lite-plugins but changed to avoid restarting
the application when switching project.

Current problem:
- the reload of the treeview take some time without any feedback for the
  user
2020-12-06 00:57:27 +01:00
Francesco Abbate afda299fe4 Implement optional font rendering options
The user can now choose antialiasing grayscale and subpixel and hinting
non, slight or full.
2020-12-04 16:15:54 +01:00
Francesco Abbate a337f893d9 Implement user's config as init file and add directory into package.path
Create the user's config init file if lite user's config directory does
not exists.

No longer use the awkward package.searchers but instead add user's
config dir at the end of package path.
2020-12-02 16:03:31 +01:00
Francesco Abbate 3589d7d3c0 First implementation of unix-like data directory
It basically works by setting the data directory to

$prefix/share/lite-xl

where $prefix is determined so that $prefix/bin corresponds to EXEDIR.

The packages 'user' and 'user.*' are loaded from the directory
'$HOME/.config/lite-xl'.
2020-12-02 00:23:15 +01:00
Francesco Abbate 70412b520b Fix cursor blinking problem
The problem was that when the editor had no events the cursor was not
blinking because the event loop was blocking on wait_event.

Now we no longer calls wait_event without a timeout if the windows has
the focus. When the window has the focus the timeout is set to 1 / fps
so that the cursor can blinks.

In addition we react to the "focus lost" event to ensure the documents
are redrawn without the cursor.
2020-11-21 16:36:32 +01:00
Francesco Abbate bdaddea29a Fix behavior when using un-indent command over multiple lines 2020-11-18 15:52:53 +01:00
Francesco Abbate 4a8884ef70 Increase default max limits for symbols
The previous limit, 2000, was may be too small and may prevent auto-complete from working for some big source file.
2020-11-17 12:33:57 +01:00
Francesco Abbate 1db0f703e7 Merge remote-tracking branch 'origin/master' 2020-11-17 10:28:20 +01:00
Francesco Abbate cdcd89d6d7 Merge remote-tracking branch 'rxi/master' 2020-11-17 10:24:27 +01:00
Francesco Abbate 82dc76dd00 Add recently visited files in the list when using find file command 2020-11-16 23:52:51 +01:00
Francesco Abbate 16e6a6db9d Stop scanning project file when a maximum limit is reached
To avoid excessive memory usage when opening in a directory with too many files.

Introduce the config variable config.max_project_files to choose the limit.

The mechanism introduced avoid using excessive memory but it fails to
let user access all the files in the directory. A better implementation
should not impose any limits but read each subdirectory on-demand, only
as they are expanded in the tree-view.
2020-11-16 18:12:55 +01:00
Francesco Abbate 7a856be6e4 Fix error when opening the first document if project view was active 2020-11-16 18:12:31 +01:00
Francesco Abbate edaa8fb42b Add a mechanism to avoid blank window at startup 2020-11-16 14:49:41 +01:00
Francesco Abbate 121f0e1aa0 Improve behavior for indent command with selection over multiple lines
Do not add indentation for the last line is not selected.
2020-11-16 11:52:41 +01:00
Francesco Abbate eb41569e8d Implement limits for maximum number of symbols in autocomplete
Implemented to avoid excessive memory usage when loading big files with
many unique words.
2020-11-14 23:48:56 +01:00
rxi de5cb4fa52 Improved behaviour of `doc:join-lines` when joining to empty line 2020-09-27 15:03:53 +01:00
Francesco Abbate 14ec61511d Merge remote-tracking branch 'rxi/master' 2020-07-04 22:08:25 +02:00
rxi 094cf0cc2c Fixed shift+click select behavior 2020-06-26 10:44:56 +01:00
rxi 53d555b362 Added support for mouse double/triple click+drag selection
Resolves #159
Resolves #161
2020-06-25 13:41:46 +01:00
Francesco Abbate fe0dda8309 Merge remote-tracking branch 'rxi/master' into agg-font-renderer 2020-06-16 15:00:47 +02:00
Francesco Abbate 2c6bd874fa Avoid running when there are no events and threads do not need to run 2020-06-16 14:54:08 +02:00
rxi 7517d0ef55 Changed EXEDIR to be used as default project dir 2020-06-13 08:56:13 +01:00
rxi ba6c14846b Added file-header pattern support to `syntax` 2020-06-08 16:11:22 +01:00
rxi bd0644a5bb Added resetting of selection on intermediate find-text failure 2020-06-04 14:04:46 +01:00
rxi 3569abcb53
Merge pull request #133 from 6r1d/master
Fix for keypad enter issue
2020-06-04 13:17:33 +01:00
rxi 18de4552e2 Made tab's text left-aligned if wider than the tab 2020-06-03 13:34:10 +01:00
rxi 4b167e86c6 Fixed bug in Highlighter.invalidate() when setting first_invalid_line
The value should not be updated if the current first_invalid_line is less than
the new invalid line index
2020-06-02 22:50:03 +01:00
Victor Gridnevsky a6f52197d0 Fixes keypad enter issue (#131) 2020-06-02 13:26:16 +03:00
rxi 508b6fb73a Improved RootView's EmptyView 2020-05-30 14:58:31 +01:00
rxi db8c5ea2aa Renamed core:command/file-finder => core:find-command/file 2020-05-30 09:11:42 +01:00
rxi 7fbefe40d5 Made `system.set_window_title` only be called on title change 2020-05-30 08:53:48 +01:00
rxi 1b2fda2825 Changed block movement to mimic word movement 2020-05-28 13:55:25 +01:00
rxi 9c652086e8 Improved behaviour of and renamed `translate.next|previous_word_boundary` 2020-05-28 11:57:53 +01:00
rxi 74755f5b4a Simplified implementation of `core.temp_filename()` 2020-05-27 11:38:42 +01:00
rxi e7cf551e22 Changed EmptyView text from `empty` to `lite` 2020-05-26 10:33:07 +01:00
rxi 064b6d0b95 Fixed changing of cwd and loading of commandline files
the current-working-directory is now set at the start of `core.init` after the
absolute path for all filename arguments have been resolved
2020-05-26 10:26:20 +01:00
rxi 257b9ab753 Added `core.temp_filename()` 2020-05-25 08:58:12 +01:00
rxi c2d27ab3f7 Removed `core.project_dir` 2020-05-24 13:50:32 +01:00
rxi 82e33dd2de Moved event-waiting when not focused to after run_threads() 2020-05-24 13:43:34 +01:00
rxi 946c125fd4 Changed `core.redraw` to be set to `true` by default
As the window isn't created until the first frame is drawn this is required to
assure the window is ever shown without relying on the assumption that some
other part of the program would have set this to true
2020-05-24 08:04:47 +01:00
rxi 28b1844a8b Added support for dropping a folder onto the window 2020-05-23 11:31:08 +01:00
rxi e45b3e2bc0 Minor renaming in rootview 2020-05-23 09:40:42 +01:00
rxi e7320c2291 Made RootView:open_doc() try to use previous node if current node is locked 2020-05-22 15:50:27 +01:00
rxi 7aabfebfa0 Fixed mouse-position resolution when dropping a file 2020-05-20 10:33:08 +01:00
rxi 08ce7e2563 Fixed stuck mouse-drag-selection on dropped-file
Resolves #109
2020-05-20 09:52:01 +01:00
rxi bc4bf3d384 Added core.set_active_view(); removed `focusable` boolean from View 2020-05-19 14:55:46 +01:00
rxi 8ec717f240 Added temporary backwards compatibility for `core.project_dir` 2020-05-18 10:28:01 +01:00
rxi 4ae0d477c0 Made lite set project dir to CWD; removed core.project_dir
Fixes #100
2020-05-17 17:05:56 +01:00
rxi 4644154e5b Added `config.ignore_files`
Filenames that match either the single pattern provided by
`config.ignore_files`, or any pattern in a table of patterns, will be ignored
when lite is filling the `core.project_files` table

Resolves #77
Resolves #102
2020-05-17 13:38:45 +01:00
rxi bc3147e1d0 Changed config.mouse_wheel_scroll default to multiply by SCALE 2020-05-16 09:46:31 +01:00
rxi 15129b49a6 Moved `config.treeview_size` from `config.lua` to `treeview.lua` 2020-05-16 09:44:31 +01:00
rxi b8d2805502 Exposed doc's internal insert/remove: Doc:raw_insert|remove 2020-05-14 16:40:50 +01:00
rxi ef53453246 Fixed x-offset of text in `DocView:draw_line_gutter` 2020-05-14 13:26:21 +01:00
rxi 6525269386 Made tokenizer skip parsing process on plain-text files
This, along with the earlier rencache changes should resolve #64
2020-05-14 10:10:50 +01:00
rxi bcd1b3a081 Fixed gutter text jittering when horizontal scrolling on docview 2020-05-14 10:06:47 +01:00
rxi e4ae088bb5 Added support for shift+click selecting
Resolves #71
Resolves #59
2020-05-13 16:12:20 +01:00
rxi 1f55fec94b Fixed triple-clicking on last line not selecting the line 2020-05-13 09:29:53 +01:00
rxi ed86f7d04e Fixed find-replace:select-next erroring on multiline selection 2020-05-12 20:05:17 +01:00
rxi 7f6a2710ef Made clicking the message on the StatusView open a LogView 2020-05-12 14:44:29 +01:00
rxi c215eff6d8 Improved idle CPU utilisation when not-focused, added system.wait_event() 2020-05-11 00:21:07 +01:00
rxi 543234c42e Removed redundant line from syntax highlighter 2020-05-10 09:20:06 +01:00
rxi 8671b02bdc Whitespace 2020-05-10 09:14:12 +01:00
rxi 3d49b6d200 Fixed highlighter resetting of syntax on doc filename change 2020-05-09 16:28:18 +01:00
rxi 70f62f3c8a Added `doc:rename` command; changed command_view:set_text to take `select` argument 2020-05-09 16:09:07 +01:00
rxi 7479c1380d Added commands `root:shrink` and `root:grow` 2020-05-09 14:40:26 +01:00
rxi b08f870f47 Added stripping of carriage-returns when pasting 2020-05-09 14:22:13 +01:00
rxi ffdaec47e8 Default color theme adjustments 2020-05-09 11:10:19 +01:00
rxi 18b7d70a91 Fixed rare case where core.doc.highlighter would iterate out of line bounds 2020-05-09 09:09:39 +01:00
rxi a651d48e84 Wrapped `core.on_event` calls in `core.try` 2020-05-09 08:38:51 +01:00
rxi 22171fa802 Simplified core.step() 2020-05-08 20:44:53 +01:00
rxi 31820b36ef Moved `syntax` from `doc.highlighter` to `doc` 2020-05-08 20:29:22 +01:00
rxi 2642f7443f Added default text to find-replace's "new text" input 2020-05-08 13:55:23 +01:00
rxi 1d2a0aada5 Made `doc:toggle-line-comments` command skip empty lines 2020-05-08 09:07:13 +01:00
rxi bf8565d2a1 Fixed `doc:toggle-line-comments` for syntax highlighter relocation 2020-05-07 23:11:04 +01:00
rxi 95bdb07d49 Removed unused variables 2020-05-07 22:40:34 +01:00
rxi de94c8a13c Removed unused variables in core.init 2020-05-07 22:25:52 +01:00
rxi 762c1e2b69 Fixed RootView's EmptyView keymap text
Broke due to command renaming
2020-05-07 21:46:21 +01:00
rxi f5025efbb8 Moved highlighter code from `DocView` to `Doc`
* Only one highlighter state is kept per-document as opposed
  to one per-docview
* Fixes a bug with retaining older highlighter state as a
  DocView wasn't able to detect lines changing above it's viewport
* Renames `highlighter` module to more descriptive `tokenizer`
2020-05-07 21:14:46 +01:00
rxi ae42176953 Renamed `common.matches_pattern` => `common.match_pattern` 2020-05-07 14:18:46 +01:00
rxi 5acc391288 Added logging when project module is loaded 2020-05-07 13:41:39 +01:00
rxi 596b40c741 Made `find-replace:find-symbol` use first symbol in sel as default 2020-05-07 10:55:11 +01:00
rxi 3057786ce2 Moved `matches_pattern` from `syntax` to `common` 2020-05-07 10:27:37 +01:00
rxi 73996e3dc9 Changed core to store `modified` and `size` in project_files table 2020-05-06 17:03:10 +01:00
rxi 5361bfaf9c Added open-[project|user]-module commands, renamed command/file finder commands 2020-05-06 14:48:04 +01:00
rxi 271e5434d0 Added support for a `.lite_project.lua` file in project directory 2020-05-06 13:29:35 +01:00
rxi 7610e1064f Added multiline support for LogView's messages 2020-05-06 00:06:27 +01:00
rxi 15cfbfbc46 Increased config.max_log_items from 20 to 80 2020-05-05 23:40:42 +01:00
rxi 9bd6efddd7 Made separator and separator2 fields of StatusView 2020-05-03 22:44:49 +01:00
rxi d5ffee51ff Added StatusView:get_items() 2020-05-03 18:47:55 +01:00
rxi 844dced7cd Simplified StatusView item drawing 2020-05-03 18:43:24 +01:00
rxi d859ce5fcd Added mapping for `shift+delete` to keymap 2020-05-03 18:37:06 +01:00
rxi 69e6550eba Added mappings for `ctrl+delete` and `ctrl+shift+delete` to keymap 2020-05-03 18:35:16 +01:00
rxi 05ca43e637 Changed rounding type on common.draw_text() 2020-05-03 16:48:35 +01:00
rxi 0967740d88 Improved findreplace replace log and commandview text 2020-05-02 14:45:33 +01:00
rxi 5155ce0527 Added `replace-symbol` command to findreplace plugin 2020-05-02 11:14:07 +01:00
rxi 9fc185af2f Added scroll bounds
Resolves #9
Resolves #6
Resolves #3
2020-05-02 00:21:04 +01:00
rxi 28cdd3cabe Minor cleanup in core.statusview and core.commands.core 2020-05-01 20:17:10 +01:00
rxi 4ca35fe056 Added command `doc:select-none`, added binding to `escape` 2020-05-01 19:25:17 +01:00
rxi 885ed5f860 Improved handling of zero-sized locked nodes on RootView 2020-05-01 16:17:07 +01:00
rxi ab8510291e Added find-replace:select-next, bound to ctrl+d by default 2020-05-01 10:21:57 +01:00
rxi 044fdb3655 Prevented scroll-animation when LogView is initialized 2020-04-30 14:44:52 +01:00
rxi 4d39dcaded Changed `View:get_content_offset()` to round resultant values
Avoids some issues that occur with fractional offsets, most noticable
on rectangles drawn on DocView jittering by 1-pixel when scrolling
2020-04-30 14:43:25 +01:00
rxi 439537d63e Fixed format string passed to core.error() in core.try() 2020-04-26 21:40:25 +01:00
rxi accf09c4f9 Changed printed filenames to use format-specifier "%s" instead of %q
Fixes #22
2020-04-25 13:26:55 +01:00
rxi c658b6f1ca Removed underscore from start of globals, added VERSION
eg. `_SCALE` => `SCALE`
prevents conflict with lua's own _NAME globals
2020-04-25 09:58:01 +01:00
rxi 592c16f3e0 Fixed rounding of CommandView suggestion popup box 2020-04-22 19:25:47 +01:00
rxi 9a32a00c73 Made core.log/error store call location instead of view 2020-04-22 00:02:35 +01:00
rxi 59881f81a6 Fixed common.path_suggest() for system.list_dir() changes 2020-04-21 23:47:01 +01:00
rxi 73e96c2641 Made project_scan_thread() ignore directories it can't open
Should fix #30 and #7
2020-04-21 23:43:35 +01:00
rxi 4191cf2c08 Added `core.try` wrapping of function passed to `core.add_thread` 2020-04-21 23:23:34 +01:00
rxi b7ec7a6acf core.doc.translate comment fix 2020-04-21 23:15:43 +01:00
rxi 55d7fa58d0 Removed fake mouse-moved event on scroll change
This ends up causing more problems than it solves; Fixes #29
2020-04-19 17:21:27 +01:00
rxi 503d5101b5 Reorganising of DocView's draw functions
* Renamed `draw_line_body` => `draw_line_main`
* Renamed `draw_gutter_text` => `draw_line_gutter`
* Added `draw_line_text` for *just* the line text
2020-04-18 15:27:18 +01:00
rxi 7046bfca24 Made cut/copy no-op if there is no selection 2020-04-12 11:22:16 +01:00
rxi 1be7a32c6b Fixed error on setting active view when closing certain splits in RootView 2020-04-12 11:14:49 +01:00
rxi d4284edd5c Replaced system.set_fullscreen with system.set_window_mode
Solves #24
2020-04-07 18:49:11 +01:00
rxi efed38d59c Added system.set_fullscreen() and core:toggle-fullscreen command 2020-03-25 22:44:59 +00:00
rxi 764b43494e Moved .c, .lua and .md language syntaxes from core.syntax to plugins 2020-03-07 15:53:54 +00:00
rxi 42f7f81188 Added `union`, `short` and `long` keywords to .c syntax 2020-03-07 15:50:52 +00:00
rxi 33ad329f24 Changed DocView not to strip trailing `\n` character on line's final token 2020-02-05 20:09:58 +00:00
Sergei V. Rogachev 7e868e14e6 Fixed root:switch-to-* command
Before the fix navigation between nodes in the root
view was broken: the scale factor wasn't taken into
account. Switching in the right and down directions
was impossible for scale factors greater than one.
2020-02-01 17:56:47 +03:00
rxi 719262a416 Added missing `volatile` keyword to C syntax 2020-01-25 13:54:42 +00:00
rxi 3c59abba0b Made keymap treat `right alt` as `altgr` modkey 2019-12-29 16:32:04 +00:00
rxi 2c3e393a6f Changed keymap to only treat `left alt` as `alt` modkey
This prevents AltGr from being treated as the `alt` modkey. Previously
its default behaviour would have been overridden if the keymap had an
`alt+...` stroke bound
2019-12-29 16:09:56 +00:00
rxi d8c4bfa6ba Initial commit 2019-12-28 11:17:56 +00:00