Age | Commit message (Collapse) | Author |
|
While there, also increase buf[]
OK claudio@
|
|
|
|
OK claudio@
|
|
ok miod@
|
|
found by smatch, ok miod@ millert@
|
|
Pressing control-G all the time to understand 'what file is in what
window' might be tedious. Instead, offer a configurable option
(default off) to display the file name in the lower left corner.
OK millert@ otto@
|
|
Consecutive empty lines count toward the same state, so there're
2x states (to get in and out). ^L and .PP are counted as text,
hitting those in the text should be treated as getting out of a
paragraph and then getting in.
From Walter Alejandro Iglesias and Zhihao Yuan in nvi2
ok bluhm@
|
|
The underlining was positioned in the wrong place. This fixes
the problem and matches historic ex behavior. OK op@
|
|
|
|
amendments to his diff are noted on tech
|
|
If there are two consecutive backslashes, skip past both so the
second is not mistakenly treated as an escape character.
This is consistent with how escaped backslashes are treated
in ex_substitute() and global(). From Bosco G. G.
|
|
interpreted as a macro;
|
|
and input mappings. This adds a missing check for command mappings and
simplifies the input mappings.
ok millert
|
|
This is consistent with vim's expandtab behavior.
From nvi2 (Craig Leres). OK tb@
|
|
Other users of qp->output already include a NULL check.
Avoids a crash when cursor key support is disabled in cl/cl_term.c.
From Jeremy Mates. OK tb@
|
|
jmc@ dislikes a comma before "then" in a conditional, so leave those
untouched.
ok jmc@
|
|
From trondd, tested by various
ok afresh1
|
|
Issuing a zero-arg ex_edit command (:e) while using a named buffer
with no backing file caused vi(1)/ex(1) to free the strings
representing the buffer name and the name of the temporary file.
This change detects the situation and only frees the newly allocated
EXF structure (ep).
Reported on bugs@ by kn@.
OK millert@
|
|
3rd (variadic) mode_t parameter is irrelevant. Many developers in the past
have passed mode_t (0, 044, 0644, or such), which might lead future people
to copy this broken idiom, and perhaps even believe this parameter has some
meaning or implication or application. Delete them all.
This comes out of a conversation where tb@ noticed that a strange (but
intentional) pledge behaviour is to always knock-out high-bits from
mode_t on a number of system calls as a safety factor, and his bewilderment
that this appeared to be happening against valid modes (at least visually),
but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef.
ok millert
|
|
by deleting the redundant "killersig" struct member
and using the existing sig_atomic_t cl_sigterm variable instead.
While here, garbage collect the h_hup() signal handler
which is essentially identical to h_term().
This also gets rid of the last #define & #undef in cl_main.c.
OK martijn@, and also tested by Tim <trondd at kagu hyphen tsuchi dot com>.
|
|
and h_winch() signal handlers to make one single store to a
sig_atomic_t variable. Note that the h_hup() and h_term() signal
handlers are still unsafe after this commit because they also set
the "killersig" (how fitting!) field in a global struct.
Despite storing information in static global variables rather than
in structs passed around as arguments, this patch does not cause a
change in behaviour because there is always exactly one GS object,
initialized using gs_init() called from the top of main(), and
screen_init() stores a pointer to this one and only GS object in
the .gp member of each and every SCR object. Talk about useless
abstraction...
Problem pointed out by deraadt@.
Patch from Tim <trondd at kagu hyphen tsuchi dot com> on tech@.
OK deraadt@.
|
|
A zero-row window would not be usable (no room to edit) and the
code is full of assumptions that "sp->t_rows - 1" >= 0.
From Erik Ruotsalainen, fixes a bug reported by Paul de Weerd.
|
|
Fixes things like searching for a literal tab character when
expandtab is enabled. From nvi2 (leres). OK martijn@
|
|
and installing USD/SMM/PSD docs.
jmc@ agrees with the direction, ok millert@ on an earlier diff
|
|
ok mortimer
|
|
about ancient terminals, employ the more usual term "caret" rather
than "up-arrow", and fix a few minor nits.
Patch from Andras Farkas <deepbluemistake at gmail dot com>.
Just committing right away because we don't currently install
this file, but maybe we might in the future.
|
|
If set, expands tabs to spaces in insert mode as well as when
shifting and indenting/outdenting. If quoted with ^V, a literal
tab is inserted. Adapted from NetBSD, but this implementation
more closely matches vim's behavior. OK dlg@
|
|
original diff from sven falempin, tweaked a bit by myself;
ok sthen
|
|
command or when dying from SIGTERM. This way, creating the recovery
file works again without re-adding "proc exec" to the pledge(2).
As reported by Jesper Wallin <jesper at ifconfig dot se>, this got
broken by common/main.c rev. 1.29 (Nov 19, 2015).
The general direction of the fix was suggested by brynet@.
OK brynet@ and no opposition when shown on tech@
|
|
Pointed out by jesper <at> ifconfig <dot> se
OK brynet@
|
|
setting SC_SCR_CENTER which will cause the offsets in HMAP to
be reset when painting the screen. OK martijn@ otto@
|
|
|
|
From "kshe" on tech@.
|
|
ok martijn@ henning@
|
|
fails.
OK millert@
|
|
to sometimes mean "character set", which conflicts with the normal
meaning of "optional element" in manual pages. While here, add a
few related clarifications and tweak a few details.
Triggered by a minor bug report from <trondd at kagu-tsuchi dot com>,
and by bentley@ subsequently pointing out the abuse of [].
Patch using input from jmc@, who also agreed with some previous versions.
|
|
Specifically, open files with O_NONBLOCK and enforce a mode of 0600.
|
|
These scripts generate the enums required for the ex commands and vi
options.
Before these lists had to be maintained either by hand or someone had to
stumble upon these scripts and figure out how to use them. By enabling them
these headers are now always in sync based on the comments in the
corresponding source files, which are a lot harder to miss during an
update than an extra file.
Update the awk scripts to the new enum style introduced by bentley@ with
his update on options_def.h r1.7
Feedback Makefile semantics by espie@
Original diff and OK tb@
OK millert@
|
|
cursor's current line was blank:
echo "\nfoo" > a && vi a
d(
Same fix applied by rin@NetBSD, via nvi2 project.
OK tom@ martijn@ tb@ millert@
|
|
soon as the TRACE function is called. This helps while debugging crashes.
Noticed and annoyed by while debugging the SIGTERM crash I just submitted.
OK millert@ and tb@
|
|
mode.
Found while testing previous commit by millert@
OK millert@ and tb@
|
|
regular file with the expected permissions and locks it. Inspired
by changes in NetBSD by Christos. OK martijn@
|
|
the recover file fd open so just run sendmail with stdin set to
the recover file. OK martijn@
|
|
ok schwarze@
|
|
Original diff by espie@ with some minor tweaks by myself.
OK espie@ and florian@
|
|
ok bentley@ deraadt@ millert@ tb@
|
|
|
|
|
|
|
|
ok jmc@ natano@
|