mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
init search on page feature once
This commit is contained in:
parent
4b357f8229
commit
f767c11789
23 changed files with 449 additions and 266 deletions
25
src/app/browser/window/tab/item/page/search/buffer.rs
Normal file
25
src/app/browser/window/tab/item/page/search/buffer.rs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
mod tag;
|
||||
|
||||
use tag::Tag;
|
||||
|
||||
use gtk::{prelude::TextBufferExt, TextBuffer};
|
||||
|
||||
pub struct Buffer {
|
||||
pub text_buffer: TextBuffer,
|
||||
pub tag: Tag,
|
||||
}
|
||||
|
||||
impl Buffer {
|
||||
// Constructors
|
||||
|
||||
/// Create new `Self`
|
||||
pub fn new(text_buffer: TextBuffer) -> Self {
|
||||
// Init components
|
||||
// * create new tag objects required for new buffer,
|
||||
// instead of re-use existing refs (maybe the bug)
|
||||
let tag = Tag::new(text_buffer.tag_table());
|
||||
|
||||
// Init `Self`
|
||||
Self { text_buffer, tag }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue