mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 11:35:48 +00:00
terminal: remove old semantic_prompt
This commit is contained in:
@@ -15,9 +15,9 @@ pub fn neverExtendBg(
|
||||
// Any semantic prompts should not have their background extended
|
||||
// because prompts often contain special formatting (such as
|
||||
// powerline) that looks bad when extended.
|
||||
switch (row.semantic_prompt) {
|
||||
.prompt, .prompt_continuation, .input => return true,
|
||||
.unknown, .command => {},
|
||||
switch (row.semantic_prompt2) {
|
||||
.prompt, .prompt_continuation => return true,
|
||||
.no_prompt => {},
|
||||
}
|
||||
|
||||
for (0.., cells) |x, *cell| {
|
||||
|
||||
@@ -1898,10 +1898,6 @@ pub const Row = packed struct(u64) {
|
||||
/// false negatives. This is used to optimize hyperlink operations.
|
||||
hyperlink: bool = false,
|
||||
|
||||
/// The semantic prompt type for this row as specified by the
|
||||
/// running program, or "unknown" if it was never set.
|
||||
semantic_prompt: SemanticPrompt = .unknown,
|
||||
|
||||
/// The semantic prompt state for this row.
|
||||
///
|
||||
/// This is ONLY meant to note if there are ANY cells in this
|
||||
@@ -1933,9 +1929,9 @@ pub const Row = packed struct(u64) {
|
||||
/// screen.
|
||||
dirty: bool = false,
|
||||
|
||||
_padding: u20 = 0,
|
||||
_padding: u23 = 0,
|
||||
|
||||
/// The semantic prompt state of the row. See `semantic_prompt`.
|
||||
/// The semantic prompt state of the row. See `semantic_prompt2`.
|
||||
pub const SemanticPrompt2 = enum(u2) {
|
||||
/// No prompt cells in this row.
|
||||
no_prompt = 0,
|
||||
@@ -1946,29 +1942,6 @@ pub const Row = packed struct(u64) {
|
||||
prompt_continuation = 2,
|
||||
};
|
||||
|
||||
/// Semantic prompt type.
|
||||
pub const SemanticPrompt = enum(u3) {
|
||||
/// Unknown, the running application didn't tell us for this line.
|
||||
unknown = 0,
|
||||
|
||||
/// This is a prompt line, meaning it only contains the shell prompt.
|
||||
/// For poorly behaving shells, this may also be the input.
|
||||
prompt = 1,
|
||||
prompt_continuation = 2,
|
||||
|
||||
/// This line contains the input area. We don't currently track
|
||||
/// where this actually is in the line, so we just assume it is somewhere.
|
||||
input = 3,
|
||||
|
||||
/// This line is the start of command output.
|
||||
command = 4,
|
||||
|
||||
/// True if this is a prompt or input line.
|
||||
pub fn promptOrInput(self: SemanticPrompt) bool {
|
||||
return self == .prompt or self == .prompt_continuation or self == .input;
|
||||
}
|
||||
};
|
||||
|
||||
/// Returns true if this row has any managed memory outside of the
|
||||
/// row structure (graphemes, styles, etc.)
|
||||
pub inline fn managedMemory(self: Row) bool {
|
||||
|
||||
Reference in New Issue
Block a user