Ignoring invalid key sequences simplifies input handling in UIs. The only
downside is having to use "<lt>" everytime a "<" is needed on functional tests.
- Rewrote a few sentences for clarity/brevity
- Various spelling/grammar fixes
- Mention exact time before SIGKILL (mentioned in /src/nvim/os/job.c)
- Reflowed all changed paragraphs accordingly
- Standardize indentation level
- Remove trailing whitespace
- Job control example:
- Don't buffer output (echo -n); just print a new line for every
update.
- Use single quotes around jobsend() arguments to allow for proper
interpretation of newline characters.
- Sleep 1 second between updates instead of 2; 10 seconds is plenty of
time for such a simple example.
- Remove note about how {channel} is rpcstop's only argument; just
mention {channel} at the beginning like the other descriptions.
- Small grammar fixes
At 31c8440fee, some variables were changed
from int to long, to avoid -Wconversion errors. Long type was the
appropiate one because getdigits() was returning a long.
Now that we have get_int_digits() and get_long_digits(), we can revert
mentioned variables to int, and use get_int_digits() without having
-Wconversion warnings.
Problem : getdigits() currently returns a long, but at most places,
return value is casted (unsafely) into an int. Making casts
safe would introduce a lot of fuss in the form of assertions
checking for limits.
Note : We cannot just change return type to int, because, at some
places, legitimate long values are used. For example, in
diff.c, for line numbers.
Solution : Introduce new functions:
- get_digits() : Gets an intmax_t from a string.
- get_int_digits() : Wrapper for ints.
- get_long_digits() : Wrapper for longs.
And replace getdigits() invocations by the appropiate
wrapper invocations.
- <color_related_stuff>: long_u --> uint32_t
Everywhere long_u was used to hold a color value.
Color values are supposed to be 32 bits at most.
Supported architectures have 32 bits ints, so we could have used plain
ints. But this wouldn't be future-proof, and would be wasteful if a
future architecture has ints bigger than 32 bits.
So, uint32_t is perfect to achieve optimal packing no matter the
architecture.
- bytes_to_print/bytes_printed: long_u --> size_t
Seems like the correct thing, and gets rid of some casts.
Problem : Out-of-bound read from a buffer.
Diagnostic : False positive.
Rationale : nv_max_linear should always be less than nv_cmd_idx size
(NV_CMDS_SIZE).
Resolution : Assert rationale.
Problem : Out-of-bounds-write to a buffer.
Diagnostic : False positive.
Diagnostic : Suggested error location is under isupper(c) condition,
which makes suggested error impossible. Coverity just fails
to take isupper() postcondition into account.
Resolution : Assert isupper() postcondition.
Problem : Out-of-bounds read from a buffer.
Diagnostic : False positive.
Rationale : Suggested error path implies isupper(*str) being true,
which makes error vanish. Coverity just fails to take into
account isupper() postcondition.
Resolution : Assert isupper() postcondition.
Problem: Appending a block in the middle of a tab does not work correctly
when virtualedit is set.
Solution: Decrement spaces and count, don't reset them. (James McCoy)
https://code.google.com/p/vim/source/detail?r=v7-4-559