Implement double click

This commit is contained in:
Krzosa Karol
2024-07-02 07:10:32 +02:00
parent ce13f83d46
commit e0505dc974
4 changed files with 54 additions and 3 deletions

View File

@@ -614,4 +614,11 @@ int64_t MoveUp(Buffer &buffer, int64_t pos) {
LineAndColumn info = FindLineAndColumn(buffer, pos);
int64_t new_pos = FindPos(buffer, info.line.number - 1, info.column);
return new_pos;
}
Range EncloseWord(Buffer &buffer, int64_t pos) {
Range result = {};
result.min = Seek(buffer, pos, ITERATE_BACKWARD);
result.max = Seek(buffer, pos, ITERATE_FORWARD);
return result;
}