diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-01-26 20:40:05 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-01-26 21:48:52 +0100 |
| commit | cdd8c4b9a1544b64f2176df64dd7e24a2e08b74a (patch) | |
| tree | f75685ce33cfc33870a8372ed2861852e1a12b89 /sam.h | |
| parent | b58b76bca867ee2a845c695faa3f1a5853cffc60 (diff) | |
| download | vis-cdd8c4b9a1544b64f2176df64dd7e24a2e08b74a.tar.gz vis-cdd8c4b9a1544b64f2176df64dd7e24a2e08b74a.tar.xz | |
sam: disallow destructive commands in groups and looping constructs
This should fix segfaults for commands like `:{ q i/foo/ }` or
`:x/pattern/ q` where a command invalidates the current window.
The checks are a bit too strict, for example a destructive command at the
end of a non-nested group would be fine, but is currently also rejected.
Diffstat (limited to 'sam.h')
| -rw-r--r-- | sam.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -18,6 +18,8 @@ enum SamError { SAM_ERR_MARK, SAM_ERR_CONFLICT, SAM_ERR_WRITE_CONFLICT, + SAM_ERR_LOOP_INVALID_CMD, + SAM_ERR_GROUP_INVALID_CMD, }; bool sam_init(Vis*); |
