mirror of
https://github.com/mintycube/st.git
synced 2024-10-22 14:05:49 +02:00
tiny code-style and typo-fix in comment (df79f2)
This commit is contained in:
parent
5c7d8ab1ad
commit
338818b2b3
@ -1,4 +1,4 @@
|
|||||||
Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this st 0.8.3 (4e90c0, 2020-05-09) project has a different take on st patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more.
|
Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this st 0.8.3 (df79f2, 2020-05-09) project has a different take on st patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more.
|
||||||
|
|
||||||
For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1 in [patches.h](https://github.com/bakkeby/st-flexipatch/blob/master/patches.def.h):
|
For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1 in [patches.h](https://github.com/bakkeby/st-flexipatch/blob/master/patches.def.h):
|
||||||
```c
|
```c
|
||||||
@ -15,7 +15,7 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the
|
|||||||
|
|
||||||
### Changelog:
|
### Changelog:
|
||||||
|
|
||||||
2020-05-20 - Upgrade to 4e90c0, 2020-05-09, removed visualbell 1, 2, 3 patches and force redraw after keypress due to incompatibility
|
2020-05-20 - Upgrade to df79f2, 2020-05-09, removed visualbell 1, 2, 3 patches and force redraw after keypress due to incompatibility
|
||||||
|
|
||||||
2020-04-20 - Upgrade to c279f5, 2020-04-19, and added the force redraw on pselect after key is pressed patch and the externalpipein patch
|
2020-04-20 - Upgrade to c279f5, 2020-04-19, and added the force redraw on pselect after key is pressed patch and the externalpipein patch
|
||||||
|
|
||||||
|
8
st.c
8
st.c
@ -46,10 +46,10 @@
|
|||||||
|
|
||||||
/* macros */
|
/* macros */
|
||||||
#define IS_SET(flag) ((term.mode & (flag)) != 0)
|
#define IS_SET(flag) ((term.mode & (flag)) != 0)
|
||||||
#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == '\177')
|
#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == 0x7f)
|
||||||
#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f))
|
#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f))
|
||||||
#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c))
|
#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c))
|
||||||
#define ISDELIM(u) (u && wcschr(worddelimiters, u))
|
#define ISDELIM(u) (u && wcschr(worddelimiters, u))
|
||||||
|
|
||||||
enum term_mode {
|
enum term_mode {
|
||||||
MODE_WRAP = 1 << 0,
|
MODE_WRAP = 1 << 0,
|
||||||
@ -2185,7 +2185,7 @@ tdumpline(int n)
|
|||||||
bp = &term.line[n][0];
|
bp = &term.line[n][0];
|
||||||
end = &bp[MIN(tlinelen(n), term.col) - 1];
|
end = &bp[MIN(tlinelen(n), term.col) - 1];
|
||||||
if (bp != end || bp->u != ' ') {
|
if (bp != end || bp->u != ' ') {
|
||||||
for ( ;bp <= end; ++bp)
|
for ( ; bp <= end; ++bp)
|
||||||
tprinter(buf, utf8encode(bp->u, buf));
|
tprinter(buf, utf8encode(bp->u, buf));
|
||||||
}
|
}
|
||||||
tprinter("\n", 1);
|
tprinter("\n", 1);
|
||||||
@ -2477,7 +2477,7 @@ tputc(Rune u)
|
|||||||
Glyph *gp;
|
Glyph *gp;
|
||||||
|
|
||||||
control = ISCONTROL(u);
|
control = ISCONTROL(u);
|
||||||
if (!IS_SET(MODE_UTF8) && !IS_SET(MODE_SIXEL)) {
|
if (!IS_SET(MODE_UTF8 | MODE_SIXEL)) {
|
||||||
c[0] = u;
|
c[0] = u;
|
||||||
width = len = 1;
|
width = len = 1;
|
||||||
} else {
|
} else {
|
||||||
|
2
x.c
2
x.c
@ -2313,7 +2313,7 @@ run(void)
|
|||||||
* triggers drawing, we first wait a bit to ensure we got
|
* triggers drawing, we first wait a bit to ensure we got
|
||||||
* everything, and if nothing new arrives - we draw.
|
* everything, and if nothing new arrives - we draw.
|
||||||
* We start with trying to wait minlatency ms. If more content
|
* We start with trying to wait minlatency ms. If more content
|
||||||
* arrives sooner, we retry with shorter and shorter preiods,
|
* arrives sooner, we retry with shorter and shorter periods,
|
||||||
* and eventually draw even without idle after maxlatency ms.
|
* and eventually draw even without idle after maxlatency ms.
|
||||||
* Typically this results in low latency while interacting,
|
* Typically this results in low latency while interacting,
|
||||||
* maximum latency intervals during `cat huge.txt`, and perfect
|
* maximum latency intervals during `cat huge.txt`, and perfect
|
||||||
|
Loading…
Reference in New Issue
Block a user