Context references buffer and window with a safe_ptr
This commit is contained in:
parent
4dfc910195
commit
9c78453cb7
|
@ -33,8 +33,8 @@ struct Context
|
|||
}
|
||||
bool has_window() const { return m_window; }
|
||||
public:
|
||||
Window* m_window;
|
||||
Buffer* m_buffer;
|
||||
safe_ptr<Window> m_window;
|
||||
safe_ptr<Buffer> m_buffer;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -503,5 +503,6 @@ int main(int argc, char* argv[])
|
|||
puts(error.description().c_str());
|
||||
return -1;
|
||||
}
|
||||
main_context = Context();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class HighlighterGroup;
|
|||
// to the editing ones already provided by the Editor class.
|
||||
// Display can be customized through the use of highlighters handled by
|
||||
// the window's HighlighterGroup
|
||||
class Window : public Editor, public OptionManagerWatcher
|
||||
class Window : public Editor, public OptionManagerWatcher, public SafeCountable
|
||||
{
|
||||
public:
|
||||
~Window();
|
||||
|
|
Loading…
Reference in New Issue
Block a user