diff options
| author | Maxime Coste <mawww@kakoune.org> | 2022-12-17 10:10:10 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2022-12-17 10:10:10 +1100 |
| commit | 938be7a7b0fb0753329bc74735e4d9d2132ea28c (patch) | |
| tree | 466be507f81b423279d5f9b9cf6ca92fd916ffdb /src | |
| parent | 86bd4efd258a3e51245f5a6fcca9ee19790dee6e (diff) | |
| parent | f79580680a09ff3c56466746805bfe9262f07ba8 (diff) | |
Merge remote-tracking branch 'krobelus/no-selection-history-in-draft-context'
Diffstat (limited to 'src')
| -rw-r--r-- | src/context.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/context.hh b/src/context.hh index 3f8fbc02..5ef3c42c 100644 --- a/src/context.hh +++ b/src/context.hh @@ -228,7 +228,7 @@ struct ScopedSelectionEdition { ScopedSelectionEdition(Context& context) : m_context{context}, - m_buffer{context.has_buffer() ? &context.buffer() : nullptr} + m_buffer{not (m_context.flags() & Context::Flags::Draft) and context.has_buffer() ? &context.buffer() : nullptr} { if (m_buffer) m_context.m_selection_history.begin_edition(); } ScopedSelectionEdition(ScopedSelectionEdition&& other) : m_context{other.m_context}, m_buffer{other.m_buffer} { other.m_buffer = nullptr; } |
