From 4c5af84a8e9a01622d6e9852912b4fadf8c66677 Mon Sep 17 00:00:00 2001 From: jackpot51 Date: Thu, 30 Nov 2023 21:43:38 +0000 Subject: [PATCH] deploy: 1cf36f8a5da243ddc1a76504655243ba6c89888b --- cosmic_text/struct.Editor.html | 6 +++--- cosmic_text/trait.Edit.html | 2 +- src/cosmic_text/edit/editor.rs.html | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cosmic_text/struct.Editor.html b/cosmic_text/struct.Editor.html index d88c127904..06f5c126e8 100644 --- a/cosmic_text/struct.Editor.html +++ b/cosmic_text/struct.Editor.html @@ -1,6 +1,6 @@ Editor in cosmic_text - Rust

Struct cosmic_text::Editor

source ·
pub struct Editor { /* private fields */ }
Expand description

A wrapper of Buffer for easy editing

Implementations§

source§

impl Editor

source

pub fn new(buffer: Buffer) -> Self

Create a new Editor with the provided Buffer

-

Trait Implementations§

source§

impl Debug for Editor

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Edit for Editor

source§

fn draw<F>( +

Trait Implementations§

source§

impl Debug for Editor

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Edit for Editor

source§

fn draw<F>( &self, font_system: &mut FontSystem, cache: &mut SwashCache, @@ -8,8 +8,8 @@ f: F )where F: FnMut(i32, i32, u32, u32, Color),

Draw the editor

-
source§

fn buffer(&self) -> &Buffer

Get the internal Buffer
source§

fn buffer_mut(&mut self) -> &mut Buffer

Get the internal Buffer, mutably
source§

fn cursor(&self) -> Cursor

Get the current cursor
source§

fn set_cursor(&mut self, cursor: Cursor)

Set the current cursor
source§

fn selection(&self) -> Selection

Get the current selection position
source§

fn set_selection(&mut self, selection: Selection)

Set the current selection position
source§

fn auto_indent(&self) -> bool

Get the current automatic indentation setting
source§

fn set_auto_indent(&mut self, auto_indent: bool)

Enable or disable automatic indentation
source§

fn tab_width(&self) -> u16

Get the current tab width
source§

fn set_tab_width(&mut self, tab_width: u16)

Set the current tab width. A tab_width of 0 is not allowed, and will be ignored
source§

fn shape_as_needed(&mut self, font_system: &mut FontSystem)

Shape lines until scroll, after adjusting scroll if the cursor moved
source§

fn copy_selection(&self) -> Option<String>

Copy selection
source§

fn delete_selection(&mut self) -> bool

Delete selection, adjusting cursor and returning true if there was a selection
source§

fn insert_string(&mut self, data: &str, attrs_list: Option<AttrsList>)

Insert a string at the current cursor or replacing the current selection with the given -attributes, or with the previous character’s attributes if None is given.
source§

fn apply_change(&mut self, change: &Change) -> bool

Apply a change
source§

fn start_change(&mut self)

Start collecting change
source§

fn finish_change(&mut self) -> Option<Change>

Get completed change
source§

fn action(&mut self, font_system: &mut FontSystem, action: Action)

Perform an Action on the editor
source§

fn borrow_with<'a>( +

source§

fn buffer(&self) -> &Buffer

Get the internal Buffer
source§

fn buffer_mut(&mut self) -> &mut Buffer

Get the internal Buffer, mutably
source§

fn cursor(&self) -> Cursor

Get the current cursor
source§

fn set_cursor(&mut self, cursor: Cursor)

Set the current cursor
source§

fn selection(&self) -> Selection

Get the current selection position
source§

fn set_selection(&mut self, selection: Selection)

Set the current selection position
source§

fn auto_indent(&self) -> bool

Get the current automatic indentation setting
source§

fn set_auto_indent(&mut self, auto_indent: bool)

Enable or disable automatic indentation
source§

fn tab_width(&self) -> u16

Get the current tab width
source§

fn set_tab_width(&mut self, tab_width: u16)

Set the current tab width. A tab_width of 0 is not allowed, and will be ignored
source§

fn shape_as_needed(&mut self, font_system: &mut FontSystem)

Shape lines until scroll, after adjusting scroll if the cursor moved
source§

fn copy_selection(&self) -> Option<String>

Copy selection
source§

fn delete_selection(&mut self) -> bool

Delete selection, adjusting cursor and returning true if there was a selection
source§

fn insert_string(&mut self, data: &str, attrs_list: Option<AttrsList>)

Insert a string at the current cursor or replacing the current selection with the given +attributes, or with the previous character’s attributes if None is given.
source§

fn apply_change(&mut self, change: &Change) -> bool

Apply a change
source§

fn start_change(&mut self)

Start collecting change
source§

fn finish_change(&mut self) -> Option<Change>

Get completed change
source§

fn action(&mut self, font_system: &mut FontSystem, action: Action)

Perform an Action on the editor
source§

fn borrow_with<'a>( &'a mut self, font_system: &'a mut FontSystem ) -> BorrowedWithFontSystem<'a, Self>where diff --git a/cosmic_text/trait.Edit.html b/cosmic_text/trait.Edit.html index a340a327ed..ad5367518c 100644 --- a/cosmic_text/trait.Edit.html +++ b/cosmic_text/trait.Edit.html @@ -68,4 +68,4 @@ ) -> BorrowedWithFontSystem<'a, Self>where Self: Sized,

Mutably borrows self together with an FontSystem for more convenient methods

source

fn selection_bounds(&self) -> Option<(Cursor, Cursor)>

Get the bounds of the current selection

-

Implementors§

\ No newline at end of file +

Implementors§

source§

impl Edit for Editor

\ No newline at end of file diff --git a/src/cosmic_text/edit/editor.rs.html b/src/cosmic_text/edit/editor.rs.html index 3481f58db6..e11a04eb17 100644 --- a/src/cosmic_text/edit/editor.rs.html +++ b/src/cosmic_text/edit/editor.rs.html @@ -1092,6 +1092,9 @@ 1092 1093 1094 +1095 +1096 +1097
// SPDX-License-Identifier: MIT OR Apache-2.0
 
 #[cfg(not(feature = "std"))]
@@ -1422,6 +1425,9 @@
         // Reset cursor to start of selection
         self.cursor = start;
 
+        // Reset selection to None
+        self.selection = Selection::None;
+
         // Delete from start to end of selection
         self.delete_range(start, end);