|
1 | 1 | #include "vterm-module.h"
|
2 | 2 | #include <fcntl.h>
|
3 | 3 | #ifdef __APPLE__
|
4 |
| -# include <util.h> |
| 4 | +#include <util.h> |
5 | 5 | #else
|
6 |
| -# include <pty.h> |
| 6 | +#include <pty.h> |
7 | 7 | #endif
|
8 | 8 | #include <pthread.h>
|
9 | 9 | #include <signal.h>
|
@@ -154,11 +154,12 @@ static emacs_value render_text(emacs_env *env, char *buffer, int len,
|
154 | 154 | emacs_value strike = cell->attrs.strike ? Qt : Qnil;
|
155 | 155 |
|
156 | 156 | // TODO: Blink, font, dwl, dhl is missing
|
157 |
| - emacs_value properties = list( |
158 |
| - env, (emacs_value[]){Qforeground, foreground, Qbackground, background, |
| 157 | + emacs_value properties = |
| 158 | + list(env, |
| 159 | + (emacs_value[]){Qforeground, foreground, Qbackground, background, |
159 | 160 | Qweight, bold, Qunderline, underline, Qslant, italic,
|
160 | 161 | Qreverse, reverse, Qstrike, strike},
|
161 |
| - 14); |
| 162 | + 14); |
162 | 163 |
|
163 | 164 | put_text_property(env, text, Qface, properties);
|
164 | 165 |
|
@@ -193,7 +194,8 @@ static void goto_char(emacs_env *env, int pos) {
|
193 | 194 | env->funcall(env, Fgoto_char, 1, (emacs_value[]){point});
|
194 | 195 | }
|
195 | 196 |
|
196 |
| -static void vterm_put_caret(VTerm *vt, emacs_env *env, int row, int col, int offset) { |
| 197 | +static void vterm_put_caret(VTerm *vt, emacs_env *env, int row, int col, |
| 198 | + int offset) { |
197 | 199 | int rows, cols;
|
198 | 200 | vterm_get_size(vt, &rows, &cols);
|
199 | 201 | // row * (cols + 1) because of newline character
|
@@ -292,7 +294,7 @@ static void vterm_flush_output(struct Term *term) {
|
292 | 294 | }
|
293 | 295 |
|
294 | 296 | static void term_finalize(void *object) {
|
295 |
| - struct Term *term = (struct Term*)object; |
| 297 | + struct Term *term = (struct Term *)object; |
296 | 298 | pthread_cancel(term->thread);
|
297 | 299 | pthread_join(term->thread, NULL);
|
298 | 300 | vterm_free(term->vt);
|
@@ -416,7 +418,7 @@ static emacs_value Fvterm_update(emacs_env *env, ptrdiff_t nargs,
|
416 | 418 | if (nargs > 1) {
|
417 | 419 | ptrdiff_t len = string_bytes(env, args[1]);
|
418 | 420 | unsigned char key[len];
|
419 |
| - env->copy_string_contents(env, args[1], (char*)key, &len); |
| 421 | + env->copy_string_contents(env, args[1], (char *)key, &len); |
420 | 422 | VTermModifier modifier = VTERM_MOD_NONE;
|
421 | 423 | if (env->is_not_nil(env, args[2]))
|
422 | 424 | modifier = modifier | VTERM_MOD_SHIFT;
|
|
0 commit comments