Skip to content

Commit b88f742

Browse files
committed
🚑 Fix warna API about background color
1 parent 4841710 commit b88f742

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,18 @@ end
9393

9494
#### [luatex](https://www.luatex.org/)
9595

96-
See [texluap](https://luarocks.org/modules/freed-wu/texluap).
97-
98-
#### [neomutt](https://neomutt.org)
99-
100-
Broken in [upstream](https://github.com/neomutt/neomutt/issues/4328)
96+
See [texluap](https://texrocks.readthedocs.io/en/latest/topics/texluap.md.html).
10197

10298
### Lua 5.4
10399

104100
#### [pandoc](https://pandoc.org)
105101

106102
![pandocp](https://github.com/wakatime/prompt-style.lua/assets/32936898/b556effe-6be7-4cf9-b612-b1283d6de721)
107103

104+
#### [neomutt](https://neomutt.org)
105+
106+
![neomuttp](https://github.com/user-attachments/assets/987820e6-cdb4-4a2b-a190-5ab16c4449b7)
107+
108108
## Install
109109

110110
### [AUR](https://aur.archlinux.org/packages/lua-prompt-style)

lua/prompt/style.lua

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
---prompt style.
22
local os = require "os"
33
local table = require "table"
4-
-- texlua has a builtin lfs, use it
5-
if lfs then
6-
lfs_ = lfs
7-
else
8-
_, lfs_ = pcall(require, "lfs")
9-
end
10-
local lfs = lfs_
4+
local lfs = require"lfs"
115
local warna = require "warna"
126
warna.options.level = 3
137
local ansicolors = warna.format
@@ -248,9 +242,9 @@ local function generate_ps1(char, sections)
248242
if text ~= "" then
249243
text = format:format(text)
250244
if last_bg == "" then
251-
ps1 = ps1 .. "%{" .. fg .. " " .. bg .. "bg}" .. text
245+
ps1 = ps1 .. "%{" .. fg .. " bg-" .. bg .. "}" .. text
252246
else
253-
ps1 = ps1 .. "%{" .. last_bg .. " " .. bg .. "bg}" .. sep ..
247+
ps1 = ps1 .. "%{" .. last_bg .. " bg-" .. bg .. "}" .. sep ..
254248
"%{" .. fg .. "}" .. text
255249
end
256250
last_bg = bg

0 commit comments

Comments
 (0)