Kernel: Add hack to not kernel panic when running vim
This commit is contained in:
@@ -427,10 +427,15 @@ namespace Kernel
|
|||||||
case 'n':
|
case 'n':
|
||||||
if (m_ansi_state.nums[0] == 6)
|
if (m_ansi_state.nums[0] == 6)
|
||||||
{
|
{
|
||||||
|
// NOTE: this is very hacky but should be fine as long
|
||||||
|
// as kernel doesn't use this
|
||||||
|
while (!m_input_mutex.try_lock())
|
||||||
|
Processor::pause();
|
||||||
BAN::Formatter::print(
|
BAN::Formatter::print(
|
||||||
[this](char ch) { handle_input_byte(ch); },
|
[this](char ch) { handle_input_byte(ch); },
|
||||||
"\e[{};{}R", m_row + 1, m_column + 1
|
"\e[{};{}R", m_row + 1, m_column + 1
|
||||||
);
|
);
|
||||||
|
m_input_mutex.unlock();
|
||||||
return reset_ansi();
|
return reset_ansi();
|
||||||
};
|
};
|
||||||
reset_ansi();
|
reset_ansi();
|
||||||
|
|||||||
Reference in New Issue
Block a user