Limit tab completion to text before the cursor

`substr` takes a count, so the text after the cursor joined the prefix.
This commit is contained in:
noctuum
2026-09-27 22:39:35 +05:00
committed by Jari Sundell
parent 9f6fd7994e
commit e656801cfa
4 changed files with 104 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
#include "test/helpers/test_fixture.h"
#include <string>
class TestInputPathInput : public test_fixture {
CPPUNIT_TEST_SUITE(TestInputPathInput);
CPPUNIT_TEST(test_complete_at_end);
CPPUNIT_TEST(test_complete_mid_line);
CPPUNIT_TEST(test_cursor_on_separator);
CPPUNIT_TEST_SUITE_END();
public:
void setUp();
void tearDown();
void test_complete_at_end();
void test_complete_mid_line();
void test_cursor_on_separator();
private:
std::string m_temp_dir;
};