mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-18 08:51:15 -03:00
Stop storing is_breakpoint inside the parser
This can also be trivially computed from the block list.
This commit is contained in:
@@ -169,9 +169,6 @@ struct library_data_t {
|
||||
/// Whether we are running a subshell command.
|
||||
bool is_subshell{false};
|
||||
|
||||
/// Whether we are running due to a `breakpoint` command.
|
||||
bool is_breakpoint{false};
|
||||
|
||||
/// Whether we are running an event handler. This is not a bool because we keep count of the
|
||||
/// event nesting level.
|
||||
int is_event{0};
|
||||
@@ -341,6 +338,9 @@ class parser_t : public std::enable_shared_from_this<parser_t> {
|
||||
/// This supports 'status is-block'.
|
||||
bool is_block() const;
|
||||
|
||||
/// \return whether we have a breakpoint block.
|
||||
bool is_breakpoint() const;
|
||||
|
||||
/// Returns the block at the given index. 0 corresponds to the innermost block. Returns nullptr
|
||||
/// when idx is at or equal to the number of blocks.
|
||||
const block_t *block_at_index(size_t idx) const;
|
||||
|
||||
Reference in New Issue
Block a user