use CTRL+w to write the file out for now
This commit is contained in:
parent
c059cd8c09
commit
e6501ec4fc
@ -367,6 +367,12 @@ void BufferPane::handle_key(uint32_t keyval)
|
|||||||
m_window->request_redraw();
|
m_window->request_redraw();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case Window::KEYMOD_CTRL + 'w':
|
||||||
|
if (m_buffer->filename() != "")
|
||||||
|
{
|
||||||
|
m_buffer->write_to_file(m_buffer->filename().c_str());
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,13 +14,6 @@ class BufferStatusPane;
|
|||||||
class Window
|
class Window
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool create(std::shared_ptr<Buffer> buffer);
|
|
||||||
void run_event_loop();
|
|
||||||
void request_redraw() { m_redraw_requested = true; }
|
|
||||||
std::shared_ptr<Font> font() const { return m_font; }
|
|
||||||
std::shared_ptr<GL> gl() const { return m_gl; }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
enum : uint32_t
|
enum : uint32_t
|
||||||
{
|
{
|
||||||
KEYMOD_CTRL = 0x10000,
|
KEYMOD_CTRL = 0x10000,
|
||||||
@ -29,6 +22,14 @@ protected:
|
|||||||
KEYMOD_GUI = 0x80000,
|
KEYMOD_GUI = 0x80000,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool create(std::shared_ptr<Buffer> buffer);
|
||||||
|
void run_event_loop();
|
||||||
|
void request_redraw() { m_redraw_requested = true; }
|
||||||
|
std::shared_ptr<Font> font() const { return m_font; }
|
||||||
|
std::shared_ptr<GL> gl() const { return m_gl; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
void resize();
|
void resize();
|
||||||
void redraw();
|
void redraw();
|
||||||
void handle_event(SDL_Event & event);
|
void handle_event(SDL_Event & event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user