* Improve number highlighting for python syntax highlighting
Adds support for octal and binary representation, as well uppercase characters (X, B and O)
* add underscore and negative hex/oct/bin value support
* Removed | from pattern
* fix nagbar failed save message
- visually separated statements with a `.`
- first statement slightly rewritten
- use `'` rather than `"`
* yeahhhh no back to `"`
* Avoid adding existing selections in `select_add_next`
* Use the first available selection as delimiter in `select_add_next`
* Fix returning searches with newlines in `search.find`
* Fix repeat search when the last result spanned multiple lines
* Execute at least one step when window has no focus
This way if `core.redraw` is set, it's respected.
* Fully run threads at least once when window has no focus
This allows threads that set `core.redraw` (like `projectsearch`) to
continue running even after the window loses focus.
"Fully" here means that `run_threads` has gone through *all* the "timed
out" coroutines at least once.
* Use `PATHSEP` in path-related functions
* Don't stop on digits when getting the common part in `system.path_compare`
* Avoid sorting multiple times in `dirwatch.get_directory_files`
This also fixes the timeout detection in `recurse_pred`.
When `time_to_wake` was <= 0, so when a coroutine needed to be executed
as soon as possible, we didn't check for events, so we only performed a
`core.step` with the blink timer.
This resulted in jerky reactions to input.
* Made coroutines make more sense, and fixed a bug.
* Fixed typo.
* Additional checking for off-cycles.
* Fixed issue with calling step too much.
* If we have no redraw, set next step time for next frame.
* Added in `now` variables to reduce calls.
* Fixed issue with set_target_size passing the wrong value to plugins that are split on the right and activated from the settings UI.
* Added position awareness for the all resize_child_node calls.
* Use normalized strokes when removing duplicates only when appropriate
* Use normalized stroke in `keymap.unbind`
* Normalize strokes by sorting the modifiers before the keys
This also sorts the modifiers in a fixed manner, decided by
`modkeys.keys`.
We need to do this because we display the strokes in a few places like
the command palette.
* docs(core.common): add and improve documentation
* refactor(core.common): remove unused variable to get_height()
* docs(core.common): remove messy newlines
* docs(core.common): fix wording
* docs(core.common): use integer instead of number
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* docs(core.common): update docs
the docs now follow the style in docs/ directory.
some of the changes suggested are also implemented.
* docs(core.common): fix typo
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* docs(core.common): restyle annoatations
Extra whitespaces are removed and @overload is used whenever possible.
* docs(core.common): fix various documentation errors
* docs(core.common): simplify unicode description
* docs(core.common): fix return value
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* docs(core.common): clarify common.bench for not being a benchmark
* docs(common): add disclaimer for numbers in common.serialize
---------
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* fix#1538 log scrolls automatically
adds:
- when user scrolls, position is kept no matter how many new entries
arrive
- when user scrolls up to last entry, autoscroll is enabled again
does not add buttons to jump up/down
see #1538
* move scroll-test out of on_mouse_wheel
* determine diff_index with loop
* remove check at move_towards yoffset
* use while loop instead of repeat loop
* remove meaningless setter
* remove stray var
* Revert "core syntax: strip the path from filename on syntax.get (#1168)"
This reverts commit af6c4bc152.
The previous behavior was correct and allowed access to the full path for path-dependant syntaxes.
* Use `Doc.abs_filename` to obtain syntax when possible
This allows matching full paths in language syntaxes, but we lose the
possibility of matching the project root.
* Restore horizontal scroll position after scale change
* Consider `View` horizontal size when restoring horizontal scroll
This is needed because `View:get_h_scrollable_size` includes the
horizontal size, while `View.scroll.x` doesn't.
* Fix incorrect check in doc:raw_remove
Restore caret position on command doc:cut
* merge cursors and fix new line in clipboard
* add new line to the last copied line