Add edit support for Notepad (#1093)

* WIP file editing

* WIP file editing

* Add "on_pop" handler to navigation.

* WIP Editing

* WIP for draft

* Fix mock and unit tests,  support +newline at end.

* Clean up Painter API and use string_view

* Fix optional rvalue functions

* Fix Result 'take' to be more standard

* FileWrapper stack buffer reads

* Grasping at straws

* Nit

* Move set_on_pop impl to cpp

* Workaround "Open" when file not dirty.

---------

Co-authored-by: kallanreed <kallanreed@outlook.com>
This commit is contained in:
Kyle Reed 2023-06-01 15:45:55 -07:00 committed by GitHub
parent 69011754c9
commit 8d7fdeb633
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 847 additions and 148 deletions

View file

@ -43,10 +43,8 @@ class Optional {
const T& value() const& { return value_; }
const T& operator*() const& { return value_; }
T&& value() && { return value_; }
T&& operator*() && { return value_; }
const T&& value() const&& { return value_; }
const T&& operator*() const&& { return value_; }
T&& value() && { return std::move(value_); }
T&& operator*() && { return std::move(value_); }
T* operator->() { return &value_; }
const T* operator->() const { return &value_; }