You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 6, 2021. It is now read-only.
@@ -4,143 +4,92 @@ local util = require'diagnostic.util'
4
4
localdiagnostic=require'diagnostic'
5
5
localM= {}
6
6
7
-
8
-
---------------------------------
9
-
-- local function declartion --
10
-
---------------------------------
11
-
12
-
-- currentLocation is an indicator that user has perform a jump
13
-
-- need to re-adjust prevLocationIndex and nextLocationIndex to prevent issues
14
-
localadjustLocation=function(row, col)
15
-
ifrow>M.location[M.currentLocationIndex]['lnum'] or (row==M.location[M.currentLocationIndex]['lnum'] andcol>M.location[M.currentLocationIndex]['col']) then
whileM.location[M.currentLocationIndex]['lnum'] ==M.location[M.prevLocationIndex]['lnum'] andM.location[M.currentLocationIndex]['col'] ==M.location[M.prevLocationIndex]['col'] do
41
-
M.currentLocationIndex=M.currentLocationIndex-1
42
-
M.prevLocationIndex=M.prevLocationIndex-1
43
-
M.nextLocationIndex=M.nextLocationIndex-1
44
-
end
45
-
end
46
-
47
-
localcheckNextLocation=function()
48
-
ifM.currentLocationIndex==-1then
49
-
return
50
-
end
51
-
whileM.location[M.currentLocationIndex]['lnum'] ==M.location[M.nextLocationIndex]['lnum'] andM.location[M.currentLocationIndex]['col'] ==M.location[M.nextLocationIndex]['col'] do
52
-
M.currentLocationIndex=M.currentLocationIndex+1
53
-
M.prevLocationIndex=M.prevLocationIndex+1
54
-
M.nextLocationIndex=M.nextLocationIndex+1
16
+
fori, vinipairs(M.location) do
17
+
ifv['lnum'] >cur_rowor (v['lnum'] ==cur_rowandv['col'] >cur_col+1) then
0 commit comments