• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisióndc653bc4ee774fc4322e9c2e851e223b84798884 (tree)
Tiempo2023-02-06 18:51:12
Autorbadcoff33 <none@none>
Commiterbadcoff33

Log Message

text props for each buffer

Cambiar Resumen

Diferencia incremental

--- a/autoload/torchlight.vim
+++ b/autoload/torchlight.vim
@@ -1,7 +1,18 @@
11 vim9script
22
33 export def TorchlightClearAll()
4+ var qf_items = getqflist({ "nr": "$", "all": 0 }).items
5+
46 prop_clear(1, line("$"))
7+
8+ for item in qf_items
9+ if !empty(prop_type_get("Warning", {bufnr: item.bufnr}))
10+ prop_type_delete("Warning", {bufnr: item.bufnr})
11+ endif
12+ if !empty(prop_type_get("Error", {bufnr: item.bufnr}))
13+ prop_type_delete("Error", {bufnr: item.bufnr})
14+ endif
15+ endfor
516 enddef
617
718 export def TorchlightChanged()
@@ -15,7 +26,7 @@ export def TorchlightInCurrentBuf()
1526 prop_clear(1, line("$"))
1627
1728 for item in qf_items
18- if item.bufnr == bufnr("%")
29+ # if item.bufnr == bufnr("%")
1930 bufload(item.bufnr)
2031 if item.type ==? "w"
2132 if empty(prop_type_get("Warning", {bufnr: item.bufnr}))
@@ -25,21 +36,22 @@ export def TorchlightInCurrentBuf()
2536 bufnr: item.bufnr,
2637 type: "Warning",
2738 text: item.text,
28- text_align: 'right',
39+ text_align: 'below',
40+ text_padding_left: 4
2941 })
3042 elseif item.type ==? "e"
3143 if empty(prop_type_get("Error", {bufnr: item.bufnr}))
3244 prop_type_add('Error', {bufnr: item.bufnr, highlight: 'ErrorMsg'})
3345 endif
34- prop_type_add('Error', {bufnr: item.bufnr, highlight: 'ErrorMsg'})
3546 prop_add(item.lnum, 0, {
3647 bufnr: item.bufnr,
3748 type: "Error",
3849 text: item.text,
39- text_align: 'right',
50+ text_align: 'below',
51+ text_padding_left: 4
4052 })
4153 endif
42- endif
54+ # endif
4355 endfor
4456 enddef
4557
--- a/plugin/torchlight.vim
+++ b/plugin/torchlight.vim
@@ -6,6 +6,5 @@ augroup GroupTL
66 autocmd TextChanged * torchlight.TorchlightChanged()
77 autocmd QuickFixCmdPre make torchlight.TorchlightClearAll()
88 autocmd QuickFixCmdPost make torchlight.TorchlightInCurrentBuf()
9- # autocmd BufWinEnter * torchlight.TorchlightInCurrentBuf()
109 augroup END
1110