Fix line number matching bug

This commit is contained in:
Krzosa Karol
2024-08-05 07:19:38 +02:00
parent d3b89d22fb
commit 4d22995ea3
4 changed files with 7 additions and 6 deletions

View File

@@ -225,7 +225,7 @@ function ExtractLineAndColumn(s)
s = s:sub(1, lci - 1)
return line, col, s
else
local li, lj = s:find("(%d+):$")
local li, lj = s:find("%(%d+%):$")
if li then
local line_string = s:sub(li, lj)
line = line_string:sub(2, -3)
@@ -244,7 +244,7 @@ function ExtractLineAndColumn(s)
s = s:sub(1, lci - 1)
return line, col, s
else
local li, lj = s:find("(%d+)$")
local li, lj = s:find("%(%d+%)$")
if li then
local line_string = s:sub(li, lj)
line = line_string:sub(2, -2)

View File

@@ -95,7 +95,7 @@ function ExtractLineAndColumn(s)
s = s:sub(1, lci - 1)
return line, col, s
else
local li, lj = s:find("(%d+):$")
local li, lj = s:find("%(%d+%):$")
if li then
local line_string = s:sub(li, lj)
line = line_string:sub(2, -3)
@@ -114,7 +114,7 @@ function ExtractLineAndColumn(s)
s = s:sub(1, lci - 1)
return line, col, s
else
local li, lj = s:find("(%d+)$")
local li, lj = s:find("%(%d+%)$")
if li then
local line_string = s:sub(li, lj)
line = line_string:sub(2, -2)

View File

@@ -155,6 +155,8 @@ luaL_Reg LuaFunctions[] = {
{ "FileExists", LuaFileExists},
{"GetCurrentBufferName", LuaGetCurrentBufferName},
{ "GetCurrentBufferDir", LuaGetCurrentBufferDir},
{ "print", LuaPrint},
{ "Print", LuaPrint},
{ NULL, NULL},
};

View File

@@ -1,8 +1,7 @@
- page up and down should also scroll and leave you in exactly same scroll
- I think the way sublime text and we display line highlights is confusing with multiple cursors (line highlight can be confused with selection)
- ctrl + delete maybe should stop on new line but it keeps on going
- ctrl + delete maybe should stop on new line but it keeps on going, sublime is much more careful with deleting
- bug: Latin-1 is matched as column for some reason in ApplyRules!!
- mouse execute (control right click)
- alt right click what to do ? (toggle console?)
- experiment with using multiple cursors to select command and it's input