mirror of
https://github.com/storytold/wordcraft.git
synced 2026-12-02 02:37:26 -06:00
Make select_object crate-visible for Enter on a picture.
The #4126 port called select_object from insert_break in text/unicode.rs through a pub(super) re-export, but the function itself was only pub(super) in objects/select.rs, so clippy failed on the private re-export.
This commit is contained in:
@@ -29,7 +29,7 @@ pub use picture::{OriginalSize, PictureLook, cropped_original_size, fit_size, or
|
||||
use picture::{clear_background, grown, picture_style};
|
||||
#[cfg(test)]
|
||||
pub(crate) use select::all_objects;
|
||||
pub(super) use select::select_object;
|
||||
pub(crate) use select::select_object;
|
||||
pub(crate) use select::{edit_obj, has_shape_or_canvas};
|
||||
#[cfg(test)]
|
||||
use select::{has_group, holds_ink, obj_size, with_obj};
|
||||
|
||||
@@ -176,7 +176,7 @@ pub fn min_size(o: &InlineObject) -> f32 {
|
||||
}
|
||||
|
||||
/// Select the object whose character is at `pos`.
|
||||
pub(super) fn select_object(s: &mut Session, pos: &Pos) {
|
||||
pub(crate) fn select_object(s: &mut Session, pos: &Pos) {
|
||||
s.sel = Selection { anchor: pos.clone(), focus: Pos { off: pos.off + wordcraft_doc::para::OBJ.len_utf8(), ..pos.clone() } };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user