Use a boolean rather than an int

This commit is contained in:
Kovid Goyal 2023-11-14 16:35:01 +05:30
parent 04506975e5
commit 69e3e5c727
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
3 changed files with 6 additions and 3 deletions

View file

@ -2217,11 +2217,11 @@ shell_prompt_marking(Screen *self, PyObject *data) {
if (PyErr_Occurred()) PyErr_Print();
self->linebuf->line_attrs[self->cursor->y].prompt_kind = pk;
if (pk == PROMPT_START)
CALLBACK("cmd_output_marking", "i", 0);
CALLBACK("cmd_output_marking", "O", Py_False);
} break;
case 'C':
self->linebuf->line_attrs[self->cursor->y].prompt_kind = OUTPUT_START;
CALLBACK("cmd_output_marking", "i", 1);
CALLBACK("cmd_output_marking", "O", Py_True);
break;
}
}

View file

@ -1324,7 +1324,7 @@ def manipulate_title_stack(self, pop: bool, title: str, icon: Any) -> None:
if self.child_title:
self.title_stack.append(self.child_title)
def cmd_output_marking(self, is_start: int) -> None:
def cmd_output_marking(self, is_start: bool) -> None:
if is_start:
start_time = monotonic()
self.last_cmd_output_start_time = start_time

View file

@ -53,6 +53,9 @@ def set_color_table_color(self, code, data) -> None:
def color_profile_popped(self, x) -> None:
pass
def cmd_output_marking(self, is_start: bool) -> None:
pass
def request_capabilities(self, q) -> None:
from kitty.terminfo import get_capabilities
for c in get_capabilities(q, None):