Add SyntaxEditor abstraction using optional synect feature

This commit is contained in:
Jeremy Soller 2022-11-09 10:09:42 -07:00
parent ecf61a93b1
commit 1663bfc96c
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
7 changed files with 283 additions and 167 deletions

View file

@ -1,8 +1,7 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
#[cfg(not(feature = "std"))]
use alloc::string::ToString;
#[cfg(feature = "swash")]
use alloc::string::{String, ToString};
use core::cmp;
use unicode_segmentation::UnicodeSegmentation;
@ -226,7 +225,7 @@ impl<'a> Editor<'a> {
true
}
/// Perform a [Action] on the editor
/// Perform an [Action] on the editor
pub fn action(&mut self, action: Action) {
let old_cursor = self.cursor;