Do not include the debug buffer in word completion
This commit is contained in:
parent
35d3679703
commit
06c1c5f28b
|
@ -102,10 +102,11 @@ public:
|
|||
enum class Flags
|
||||
{
|
||||
None = 0,
|
||||
File = 1,
|
||||
New = 2,
|
||||
Fifo = 4,
|
||||
NoUndo = 8,
|
||||
File = 1 << 0,
|
||||
New = 1 << 1,
|
||||
Fifo = 1 << 2,
|
||||
NoUndo = 1 << 3,
|
||||
Debug = 1 << 4
|
||||
};
|
||||
|
||||
Buffer(String name, Flags flags, StringView data = {},
|
||||
|
|
|
@ -176,7 +176,7 @@ void write_to_debug_buffer(StringView str)
|
|||
else
|
||||
{
|
||||
String line = str + (eol_back ? "\n" : "\n\n");
|
||||
new Buffer(debug_buffer_name.str(), Buffer::Flags::NoUndo, line, InvalidTime);
|
||||
new Buffer(debug_buffer_name.str(), Buffer::Flags::NoUndo | Buffer::Flags::Debug, line, InvalidTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ InsertCompletion complete_word(const Buffer& buffer, ByteCoord cursor_pos, const
|
|||
{
|
||||
for (const auto& buf : BufferManager::instance())
|
||||
{
|
||||
if (buf.get() == &buffer)
|
||||
if (buf.get() == &buffer or buf->flags() & Buffer::Flags::Debug)
|
||||
continue;
|
||||
add_matches(*buf);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user