Skip to content

Releases: Rosemoe/sora-editor

0.23.4

18 Feb 08:00
dadd162
Compare
Choose a tag to compare
0.23.4 Pre-release
Pre-release

Fixes and Enhancements

  • add logic for typing dead chars and avoid crashing for some keyboard (#547)
  • cancel selection handle animation when mouse is connected
  • fix view scrolling not being cancelled after mouse button is released
  • fix input sometimes unexpectedly entering inactive mode
  • fix inconsistent scroll position after scaling in wordwrap mode
  • fix a compatibility issue in textmate after upstream sync (devices under API 34 are affected)
  • update dependencies

Documentation Site

Previous pages in sora-editor main repository are removed and unpublished.
Introduction part of sora-editor is available at here, including a brief overview of editor and basic usage/knowledge for getting started.

0.23.3

13 Feb 08:17
2d18cc1
Compare
Choose a tag to compare
0.23.3 Pre-release
Pre-release

Fixes

  • add static APIs in Span to SpanFactory to avoid NoSuchMethodError when app minSdk < 24
    Migrate to SpanFactory recommended.

Documentation

We are adding documentation for sora-editor now!
Currently, you can visit here to explore the documentation, though it's incomplete.

0.23.2

11 Feb 06:22
8bf3450
Compare
Choose a tag to compare
0.23.2 Pre-release
Pre-release

Fixes and Enhancements

  • fix editor cursor animation
  • fix wrong keyboard meta states used when printing key is pressed
  • fix editor is not focused when soft keyboard is disabled
  • add context-click, hover, and context menu events
  • add mouse support for editor (#472)
    • select text
    • drag and drop text in editor
    • drag text into editor from other widgets (like TextView)
    • diagnostic tooltip on hover
    • built-in context menu
    • strengthened mouse wheel function

0.23.1

08 Feb 09:24
329c7c7
Compare
Choose a tag to compare
0.23.1 Pre-release
Pre-release

Hello, 2024! Here's the first major update of sora-editor in 2024.

Release Notes for 0.23.0

Fixes and Enhancements

Editor Core

  • add more XML attributes
  • optionally report cursor anchor position on screen to input method
  • fix failure in fetching scroll factor (#532 by @dingyi222666 )
  • fix completion window being cut (#420 by @dingyi222666 )
  • fix fuzzyScore sort for completion items (#538 by @dingyi222666 )
  • fix that text styles are still used after editor is released
  • add PlainTextAnalyzeManager for plain text that requires completion
  • fix incorrect rendering order of sticky lines and pinned line numbers (#539 )
  • fix stack overflow when cutting line on last editor line
  • fix thread-safety issues in Content
  • add extended attributes objects for Span, and make Span an interface
  • add span and span range in editor's motion events (click, double-click and long-click) (#540 )
  • add more editor state events for implementing user-side features
  • fix diagnostic tooltip is not dismissed on focus lost
  • add EditorSpanInteractionHandler as base implementation for clickable spans
  • cut line forward or backward (#508)
  • fix scroll position auto-adjust
  • add Ctrl+PgUp, Ctrl+PgDn, Ctrl+Shift+PgUp, Ctrl+Shift+PgDn shortcuts

Language Textmate

  • merge TM4E update from upstream
  • enable symbol pairs by default

Language LSP

  • refactor LSP library by Kotlin (#457 by @dingyi222666 )
  • add Java sample for language-lsp usage

Language Tree-sitter

  • fix access violation to tree-sitter native objects and thread-safety issues (#497 )

Language Java

  • add detection for links

Sample App

  • open links in code editor by double-click on it

Breaking Changes and Migration

Editor Selection API

The legacy moveSelectionUp, moveSelectionDown and other methods for moving/extending selection are removed.
Now selection moving and extending are seperated.

  • moveSelection method: de-select any text and move the cursor based on given movement type
  • extendSelection method: update selected range, based on the movement type passed and anchor for current text selecting
  • selection anchor is updated as selection changes and text updates

For selection movement types, please see SelectionMovement enum.

Span API (for custom languages)

Span is now interface class. To migrate to new API, note:

  • replace your field access with setters and getters
  • do not use builder-like calls to set properties of Span
  • you can not directly get underlineColor because it is resolved when the span is rendered

Release Notes for 0.23.1

Apply a minor fix to selection anchor updating.

0.22.2

01 Feb 10:06
c903c48
Compare
Choose a tag to compare
0.22.2 Pre-release
Pre-release

Note: the version is already released on Nov 26, 2023, not now. v0.23.0 will be published recently

Fixes and Enhancements

Editor Core

  • pointer icon for mouse input
  • single direction fling for better scrolling experience (enabled by default)
  • indent selected text on TAB key event (#482 by @itsaky )
  • add StaticColorSpan for dynamicly setting color from the analysis (#485 by @itsaky )
  • add null checks for CodeBlock list during rendering (#498 by @itsaky )
  • add switches to enable/disable soft keyboard (#505 by @itsaky )
  • update Numbers class to latest JDK implementation
  • dependency updates

TreeSitter

  • add API to create custom spans with TsSpanFactory (#484, #491 by @itsaky )
  • fix invalid query on TSNode in TsBracketPairs
  • remove redundant checks in LineSpansGenerator
  • update android-tree-sitter to v4.0.0

0.22.1

24 Aug 09:32
05b68c0
Compare
Choose a tag to compare
0.22.1 Pre-release
Pre-release

Fixes and Enhancements

  • add more textmate colors for tooltip (#467 by @PranavPurwar )
  • collapse sticky scroll lines automatically when text is selected for better reading (#468)
  • memorize cursor position in undo (#471, originally posted in AndroidIDE#1206)
  • ability to select text between two points. This avoids dragging on screen for long time. (originally posted in AndroidIDE#1215)
  • update tree-sitter version and replace deprecated usages with new ones
  • fix TSTree access violation when fetching bracket pairs
  • remove for-removal outdated class ContentCreator

0.22.0

31 Jul 05:14
4bf5e37
Compare
Choose a tag to compare
0.22.0 Pre-release
Pre-release

This is a major update of editor.

Bugs Fixed

editor core

  • text action tool window causes some bugs in Gboard (#401 )
  • editor string resource ids can be shadowed easily (#406 by @summerain0 )
  • clipboard text inserted is wrong when using code snippets (#409 by @itsaky )
  • text regions is sometimes wrongly patched by highlighted delimiters
  • error on old Android device because of un-desugared classes (#417 by @MuntashirAkon )
  • platform API TypedArray#close called on unsupported devices
  • null reference in code block list causes crash (#433 by @itsaky )
  • inactive tab stops in code snippets mode are wrongly computed (#438 by @yuruxuan )
  • platform deprecated class MutableInt is used
  • scaling is still possible when any selection handle is hold (#452 by @summerain0 )
  • Styles#finishBuilding call is missing in languages
  • selection handle is not taken into account when editor tries to intercept parent from handling motion events (#456 )

language-java

  • keyword completion has mis-positioned words (#453 by @yuruxuan )

editor-lsp

  • LspLanguage#getFormatter may return null values

language-textmate

  • illegal argument is not recognized but NPE is thrown when loading textmate grammar files

New Features and Enhancements

build and CI

  • snapshot builds are automatically published to maven central (#410 by @itsaky )
  • update to AGP v8

editor core

  • code snippets: nested placeholder support (#409 by @itsaky )
  • better selection handle experience with expanded region for touch detection (#358 )
  • add sticky scroll for better code reading (#376, experimental)
  • specific line number background can be modified by applying LineGutterBackground (#361 )
  • scroll fast when ALT key is pressed

language-textmate

tree-sitter

  • update to newest tree-sitter version (#439 by @itsaky )

docs

About Sticky Scroll Preview

This is the first preview of sticky scroll feature and the feature is disabled by default. Please provide feedbacks if you have any.
Sticky Scroll helps you stay oriented in your code as you scroll, which is also introduced in Visual Studio and Visual Studio Code. Refer to this post of Visual Studio for animated preview of the original feature.
In sora-editor, it's now experimentally supported, including the sticky line display and options like scope-keeping policy and max sticky line count. We also added support for click navigation - jumping to the sticky line when clicked.
Hope this feature help you enjoy a better coding experience.

Preview Image in sora-editor

image

0.21.1

10 Mar 08:21
398402f
Compare
Choose a tag to compare
0.21.1 Pre-release
Pre-release

This release includes minor bug fixes and new features.

Bugs Fixed

  • renderer may crash when null code block item is added
  • index out of bounds when selection is between CR and LF
  • CharArrayWrapper#subSequence refers to wrong text start
  • text wrongly inserted between CRLF
  • editor is still listening to text changes after release, causing memory leaks
  • occasional index out of bounds when measuring text in GraphicTextRow

Improvements

  • EditorReleaseEvent is added, allowing you to do some cleanup on destruction
  • add ContentIO for creating/saving Content texts
  • add strikethrough color in scheme
  • simplify composing text update as insertion or deletion if possible (#357)
  • signature help window for lsp (by @dingyi222666 )
  • add ThemeModel#isDark for lsp (by @dingyi222666 )

Notes

ContentReader should be migrated to ContentIO. ContentReader will be removed in future.

0.21.0

08 Jan 13:52
de67648
Compare
Choose a tag to compare
0.21.0 Pre-release
Pre-release

This release includes bug fixes and little improvement as well as minor API changes.

Bugs fixed

  • incorrect horizontal scroll range when renderFunctionCharacter is on
  • TSQuery is not verified before making access to it
  • IME that relies on InputConnection#getSurroundingText gets invalid position description when maxIPCTextLength is exceeded
  • invalid composing text range can be set through EditorInputConnection#setComposingRegion
  • text becomes dirty when using old Gboard to delete characters fast
  • animated row background is on wrong layer
  • empty text is matched repeatly in regex, leading to OOM
  • StringIndex OutOfBoundsException in TextMateNewlineHandler (by @dingyi222666 )
  • CodeEditor#release does not detach EditorColorScheme
  • NPE when sending message in AsyncIncrementalAnalyzeManager
  • leaking thread by TextMateLanguage#updateLanguage
  • ReplaceAction can be added without its DeleteAction
  • nested undo/redo is possible
  • JavaTextTokenizer does not take down current token (#349)
  • AsyncIncrementalAnalyzeManager does not update the spans of last line being affected by insertion (#350)
  • Styles#eraseAllLineStyles raises npe when no line style is there

Improvments

  • better search experience, including support for whole word search, speed improvement of regex search, cyclic jumping and better scrolling strategy (#321)
  • performance improvement of tree-sitter predicates
  • avoid edge effect in CodeEditor#ensurePositionVisible
  • boost the speed of querying search results by binary search
  • show built-in text actions window on insert handle release
  • add touch slop before magnifier is triggered
  • add I18nConfig for application provided replacement string resources
  • add DirectAccessProps#clipboardTextLengthLimit and add tip when text is unable to be copied due to limit or TransactionTooLargeException
  • more exact position of built-in text actions window
  • editor uses global default color scheme on startup
  • enhanced function of DirectAccessProps#disallowSuggestions (tested on newest Gboard and Sogou Input for MIUI)
  • adapt view parameters for long screenshot in MIUI system
  • add two new accessibility actions since Android M

Updated API

  • new function Content#substring
  • new event PublishSearchResultEvent, which is called when search result is available in main thread or searching is stopped
  • new I18nConfig class for replacing string resources
  • new function add CodeEditor#isAntiWordBreaking
  • [BREAKING] new API in EditorColorScheme for global default theme. All newly-created editors use the global default theme. Your modifications to global default theme will reflect in those editors.
  • [BREAKING] CodeEditor#getScroller now has return type EditorScroller. Get the original OverScroller by EditorScroller#getImplScroller
  • [BREAKING] AsyncIncrementalAnalyzeManager and TsAnalyzeManager will receive thread interruption on exit

0.20.4

30 Dec 09:30
cab003f
Compare
Choose a tag to compare
0.20.4 Pre-release
Pre-release

Bugs Fixed

  • member variable highlighting in tree-sitter
  • editor crashes in rendering highlighted delimeters when spans are corrupted
  • EditorDiagnosticTootipWindow can not be got from editor components
  • EventManager can not be disabled

New Features

  • CodeEditor#createSubEventManager()