We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7290879 commit 7395c15Copy full SHA for 7395c15
builtin/source/line.ts
@@ -58,6 +58,11 @@ export function line(options: LineOptions = {}): Source<Detail> {
58
let line = 1;
59
let id = 0;
60
61
+ const ncols = bufinfo
62
+ .linecount
63
+ .toString()
64
+ .length;
65
+
66
// Loop through the buffer lines in chunks.
67
while (line <= bufinfo.linecount) {
68
const content = await fn.getbufline(
@@ -70,9 +75,12 @@ export function line(options: LineOptions = {}): Source<Detail> {
70
75
71
76
let offset = 0;
72
77
for (const value of content) {
78
+ const lnumcol = (line + offset)
79
80
+ .padStart(ncols, " ");
73
81
yield {
74
82
id: id++,
- value,
83
+ value: `${lnumcol} ${value}`,
84
detail: {
85
line: line + offset,
86
bufnr: bufinfo.bufnr,
0 commit comments