• 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ón736eb83f9b6832d6112d1de4e0a1a86bcf39d0d9 (tree)
Tiempo2023-04-18 15:54:05
Autorbadcoff33 <none@none>
Commiterbadcoff33

Log Message

finetuning popup messages

Cambiar Resumen

Diferencia incremental

--- a/autoload/run.vim
+++ b/autoload/run.vim
@@ -92,12 +92,21 @@ export def CloseCb(ch: channel)
9292 errors += e.type ==? "e" ? 1 : 0
9393 endfor
9494 UpdatePopupPosition()
95- popup_create(
96- printf("DONE | %d lines | %d warnings | %d errors",
97- lines,
98- warnings,
99- errors),
100- g:WinoptsDone())
95+ var done_str = printf("%s took %dsec | %d lines",
96+ d.short_cmd,
97+ localtime() - d.started,
98+ lines)
99+ if warnings == 1
100+ done_str ..= printf(" | %d warning", warnings)
101+ elseif warnings > 1
102+ done_str ..= printf(" | %d warnings", warnings)
103+ endif
104+ if errors == 1
105+ done_str ..= printf(" | %d error", errors)
106+ elseif errors > 1
107+ done_str ..= printf(" | %d errors", errors)
108+ endif
109+ popup_create(done_str, g:WinoptsDone())
101110 if has_key(d, "winid")
102111 popup_close(d.winid)
103112 endif
@@ -154,9 +163,8 @@ var indicator = ["-", "\\", "|", "/"]
154163 var indicator_index = 0
155164
156165 def GetIndicator(): string
157- if indicator_index < 3
158- indicator_index += 1
159- else
166+ indicator_index += 1
167+ if indicator_index == 4
160168 indicator_index = 0
161169 endif
162170 return indicator[indicator_index]
@@ -172,12 +180,12 @@ def RunJobMonitoringCb(tid: number)
172180 popup_setoptions(d.winid, g:Winopts())
173181 if has_key(d, "timer") && d.timer == tid
174182 popup_settext(d.winid,
175- printf("%s %s %s | %d lines | %d sec",
183+ printf("%s %s %s | %d lines",
176184 GetIndicator(),
177185 toupper(job_status),
178186 d.short_cmd,
179- getbufinfo(d.bufnr)[0].linecount,
180- localtime() - d.started))
187+ getbufinfo(d.bufnr)[0].linecount
188+ ))
181189 break
182190 endif
183191 else