Age | Commit message (Collapse) | Author | Files | Lines |
|
replacement register (after `{`)
I found that terminating the command-line while editing the replacement register,
leaves you in a hard-to-recover state. You can/should no longer call `}`, so you would
have to go back to the last buffer (Q*U*).
Instead, this is now checked against and a test case has also been added.
|
|
* When popping from the Q-Register stack to local Q-Registers in macro calls,
problems would arise when rubbing out that macro call since we would eventually restore
a pointer that has been permanently freed along with the local Q-Registers.
* Naturally this could result in everything from Valgrind warnings to crashes.
* Added test case.
* There is still a test case that fails when run under `--valgrind`,
but it's apparently due to a glib-internal memory leak.
|
|
* This currently folds only {...} string arguments and embedded braces,
most prominently `@^Um{...}` macro definitions..
* Any additional folding for loops and IF-statements should rely on book
keeping by the main parser.
This would also help catch syntactic errors, like dangling IFs.
* We do keep track of the loop nesting, but currently only in execution mode.
* It cannot be disabled via the "fold" property.
Lexers in the container do not have properties.
|
|
The ^KMOUSE macro can also change dot and it was possible
to place dot into invisible areas at the end of the document.
|
|
* Support fold level configuration using `.SCITECO_FOLDLEVEL`.
This sets the current output line as the fold header and all subsequent lines
with the given fold level (until another `.SCITECO_FOLDLEVEL` instruction
is encountered).
* This is now done automatically for man's SH and SS macros,
so the man-page based woman pages provide folding.
* The folding margin is therefore now always enabled in fallback.teco_ini.
|
|
|
|
|
|
* After detecting +line[,column] constructs, the next argument is not parsed as a potential
filename:line[:column] construct.
* This code turned out to be tricky to get right, so I added a test case.
Standard library modules can well be checked in the test suite since
we have $SCITECOPATH pointing to the source tree's lib/ directory.
* Make sure that relevant variables from atlocal.in are really exported into the
process environment.
This was also broken for the Glib debug options.
|
|
* Set up the folding margin in the currently empty margin column
after the line number.
On Gtk, this meant resetting all the marker symbols and their
foreground/background colors as well as the margin's colors themselves.
This looks like a bug. It's not necessary on Scinterm, which apparently
uses the default/linenumber styles by default.
Perhaps we should try upgrading Scintilla?
* The folding state is considered not to be directly controlled by the
language (just like the scroll position and zoom level). That's why
we can directly control it by clicking on the margin column.
* F1 can be used to toggle all folds globally.
* The only support within the C core necessary for folding is to make
sure that the current line is unfolded after every keypress.
* We might add custom folding commands to the language later on
(e.g. F+, F-). In this case, the key macros will have to be changed
of course.
|
|
Also updated NEWS: mention v2.4.0 release.
|
|
customized (refs #34)
* In the grosciteco-generated .woman.tec files, the fonts were only
set on the monospaced styles if lexer.font was set since it was
undefined by default.
We'd need a lare IF-ELSE statement to handle that in womanpages
since woman.tes changes the default font to a variable-width font.
Just leaving the default font, therefore won't work.
* We now always initialize lexer.font in lexer.tes.
You no longer have to check for its existance.
* Consequently, you can no longer set lexer.font *before* munging
lexer.tes because it will be overwritten.
At least not without additional checks.
Such a design is not suggested by fallback.teco_ini, though.
* Fixes monospaced sections in the tutorial and other womanpages on Gtk.
|
|
variable-width font is configurable via lexer.woman.font (refs #34)
* grosciteco was just hardcoding "Monospace", regardless of what was configured via lexer.font in ~/.teco_ini
* The variable-width font used for ordinary "womanpage" body texts was hardcoded to "Serif".
It is now configurable via the lexer.woman.font register.
* There is a difference, though:
lexer.font has no default value and must therefore be checked everywhere.
This is so you can set it even before munging lexer.tes.
lexer.woman.font however has a default (Serif), so it can only be overridden after
munging lexer.tes.
Perhaps it would be easier and more consistent to have a default for lexer.font as well.
|
|
This was supposed to be done before the release,
but the braindead `dch` tool did not update the timestamp
without changing the changelog entry itself.
|
|
Also use binary packages when testing with Poudriere
(gmake -f ./distribute.mk poudriere).
|
|
* ChangeLogs now contain the dates of all releases.
* The FreeBSD package must practically be updated after uploading the release tarball.
|
|
* The GdkWindow stacking order obviously got messed up when swapping out
the child widget in the GtkEventBox.
* This was probably also responsible for input events coming through
to the Scintilla view even though the GtkEventBox should block all
input events from reaching the Scintilla view.
The event masking in teco_view_new() is probably no longer necessary -
but better keep it to be on the safe side.
|
|
file.patterns
The former is more basic and usually references file.patterns.
This helped for instance with processing SciTE's css.properties.
|
|
Especially useful since Gtk users are supposed to edit ~/.teco_css.
|
|
* The default womanpage font is the abstract "Serif" now, so that should be
more portable. "Times" wasn't found on Windows.
* Win32 distributions include a custom .teco_css now, which
removes the small-caps font attribute from the type label.
The default Gtk theme on Windows references the "Segoe UI" font
and it doesn't have a small-caps variant.
In fact no default Windows font appears to have one.
* We could add a custom .teco_ini to win32 distributions as well,
but there is currently no need for it.
* Do not distribute the /win32 files. They are used only for building
Win32/64 packages. There is no point in distributing them in the tarball if
the /debian and /freebsd directories aren't distributed as well.
|
|
touch and scroll events
* You could drag and drop text into the Scintilla views, which would confuse SciTECO.
* In the future, we might actually want to support programmable drag-and-drop
support via special key macros.
|
|
|
|
* We can therefore no longer provide 20.04 nightly builds.
Perhaps I will manually build binary releases for the v2.4.0 release for the last time.
The PPA will still provide 20.04 of course.
* The AppImages are consequently also built based on the Ubuntu 22.04 packages,
which are now the oldest supported ones.
|
|
|
|
* There are cases, especially where the entire buffer is piped through some
external process or when removing and reinserting large parts of the buffer,
that dot changes very little, but the vertical scrolling position gets resets.
This is especially noticable with the macro @^U{[: HECcat$ ]:},
but also with M#cf (clang-format wrapper from "Useful macros").
* We now try to preserve the vertical position ("first visible line")
before scrolling caret.
|
|
|
|
* At least on Windows it was observed that teco_interface_get_ansi_key()
would find ANSI keys on other layouts, but nothing corresponding to the key itself.
For instance, for a dead caret (^), we'd find backslash.
This made it impossible to type caret in the parser start states.
* We clumsily detect whether a keyevent refers to a dead key by checking its
symbolic name and pass it down to the input method unmodified.
* Fixes entering dead keys, at the very least on Windows, but potentially
on all other systems as well.
|
|
document's boundaries
|
|
This is hardcoded, but in line with the current defaults from
fnkeys.tes.
|
|
* Both the WinGUI and Wincon variants have their own idiosyncrasies:
* WinGUI ignores `mouseinterval(0)` and may report BUTTONX_CLICKED
for very quick clicks.
Therefore we now emulate separate PRESSED/RELEASED events.
* Wincon does not report BUTTONX_RELEASED at all.
Therefore we still enable click detection, so that fnkeys.tes will
work at least partially.
Therefore we also enable REPORT_MOUSE_POSITION, so that
right-click-dragging will work.
This should still be fixed in PDCurses upstream, though.
* See also https://github.com/Bill-Gray/PDCursesMod/issues/330
|
|
* It turns out that `bool` (_Bool) in bitfields may cause
padding to the next 32-bit word.
This was only observed on MinGW.
I am not entirely sure why, although the C standard does
not guarantee much with regard to bitfield memory layout
and there are 64-bit available due to passing anyway.
Actually, they could also be layed out in a different order.
* I am now consistently using guint instead of `bool` in bitfields
to prevent any potential surprises.
* The way that guint was aliased with bitfield structs
for undoing teco_machine_main_t and teco_machine_qregspec_t flags
was therefore insecure.
It was not guaranteed that the __flags field really "captures"
all of the bit field.
Even with `guint v : 1` fields, this was not guaranteed.
We would have required a static assertion for robustness.
Alternatively, we could have declared a `gsize __flags` variable
as well. This __should__ be safe since gsize should always be
pointer sized and correspond to the platform's alignment.
However, it's also not 100% guaranteed.
Using classic ANSI C enums with bit operations to encode multiple
fields and flags into a single integer also doesn't look very
attractive.
* Instead, we now define scalar types with their own teco_undo_push()
shortcuts for the bitfield structs.
This is in one way simpler and much more robust, but on the other
hand complicates access to the flag variables.
* It's a good question whether a `struct __attribute__((packed))` bitfield
with guint fields would be a reliable replacement for flag enums, that
are communicated with the "outside" (TECO) world.
I am not going to risk it until GCC gives any guarantees, though.
For the time being, bitfields are only used internally where
the concrete memory layout (bit positions) is not crucial.
* This fixes the test suite and therefore probably CI and nightly
builds on Windows.
* Test case: Rub out `@I//` or `@Xq` until before the `@`.
The parser doesn't know that `@` is still set and allows
all sorts of commands where `@` should be forbidden.
* It's unknown how long this has been broken on Windows - quite
possibly since v2.0.
|
|
|
|
`a-b"=` idiom
* There might theoretically be problems with the uncommon one's complement or magnitude
representation of negative integers, but it's practically impossible to meet those in
the wild.
* Still, we do some checks now, so we will at least notice any exotic architectures.
* Also, documented the `a^#b"=` idiom for checking for equality.
It's longer to type, but faster and will also work for floats.
For floats it will be the only permissible idiom for checking for bitwise equality
as `a-b` can be 0 even if a!=b (if the difference is very small).
Changing the `-` semantics is out of the question.
|
|
* In other words, fixed `-9223372036854775808\` on --with-teco-integer=64
(which is the default).
* The reason is that ABS(G_MININT64) == G_MININT64 since -G_MININT64 == G_MININT64.
It is therefore important not to call ABS() on arbitrary teco_int_t's.
|
|
update the horizontal position (4EJ)
|
|
* Unfortunately, the Lexilla lexer does not recognize PostgreSQL multiline
strings between $$...$$.
* All of the other SQL variants, that Scite supports, are skipped for the time
being. They'd probably have to be separate SciTECO lexer configs anyway.
|
|
|
|
* Instead of separate stand-alone commands, they are now allowed only immediately
in front of the commands that accept them.
* The order is still insignificant if both `@` and `:` are accepted.
* The number of colon modifiers is now also checked.
We basically get this for free.
* `@` has syntactic significance, so it could not be set conditionally anyway.
Still, it was possible to provoke bugs were `@` was interpreted conditionally
as in `@ 2<I/foo/$>`.
* Even when not causing bugs, a mistyped `@` would often influence the
__next__ command, causing unexpected behavior, for instance when
typing `@(233C)W`.
* While it was theoretically possible to set `:` conditionally, it could also
be "passed through" accidentally to some command where it wasn't expected as in
`:Ifoo$ C`.
I do not know of any real useful application or idiom of a conditionally set `:`.
If there would happen to be some kind of useful application, `:'` and `:|` could
be re-allowed easily, though.
* I was condidering introducing a common parser state for modified commands,
but that would have been tricky and introduce a lot of redundant command lists.
So instead, we now simply everywhere check for excess modifiers.
To simplify this task, teco_machine_main_transition_t now contains flags
signaling whether the transition is allowed with `@` or `:` modifiers set.
It currently only has to be checked in the start state, after `E` and `F`.
|
|
All state definition macros document their "base" states as well
since they form an inheritance hierarchy.
|
|
* This was actually broken if the command is preceded by `@` and `:` characters, which
are __not__ modifiers.
E.g. `Q:@I/foo^W` would have rubbed out the `:` register as well.
* Also, since it was all done in teco_state_process_edit_cmd(),
it would also rub out modifier characters from within string arguments,
E.g. `@I/::^EQ^W`
* Real commands now have their own ^W rubout implementation, while the generic
fallback just rubs out until the start state is re-established.
This fails to rub out modifiers as in `@I/^W`, though.
* Real command characters now use the common TECO_DEFINE_STATE_COMMAND().
* Added test cases for CTRL+W rub out.
A few control characters are now portably available to tests
via environment variables `$ESCAPE`, `$RUBOUT` and `$RUBOUT_WORD`.
|
|
For some strange reason, Make wouldn't know how to get tutorial.ms.
Replacing it with an equivalent `%` works flawlessly, though.
|
|
* The old heuristics - scroll if dot changes after key press -
turned out to be too simplistic.
They broke the clang-format macro (M#cf), which left the view at the
top of the document since the entire document is temporarily erased.
Other simplified examples of this bug would be:
@^Um{[: HECcat$ ]:} Mm
Or even: @^Um{[: H@X.aG.a ]:} Mm
* Actually, the heuristics could be tricked even without deleting any
significant amount of text from the buffer.
The following test case replaces the previous character with a linefeed
in a single key press:
@^Um{-DI^J$} Mm
If executed on the last visible line, dot wouldn't be scrolled into the view
since it did not change.
* At the same time, we'd like to keep the existing mouse scroll behavior from
fnkeys.tes, which is allowed to scroll dot outside of the visible area.
Therefore, dot is scrolled into view always, except after mouse events.
You may have to call SCI_SCROLLCARET manually in the ^KMOUSE macro,
which is arguably not always straight forward.
* Some macros like M#cf may still leave the vertical scrolling position
in unexpected positions. This could either be fixed by eradicating all
remaining automatic scrolling from Scintilla or by explicitly restoring
the vertical position from the macro (FIXME).
* This was broken since the introduction of mouse support,
so it wasn't in v2.3.0.
|
|
--enable-html-docs
* `--enable-html-manual` renamed to `--enable-html-docs`.
* It's also uploaded to the website and linked to in README.
|
|
of Groff
|
|
There are still some glitches with non-mainstream assemblers like A86, though.
|
|
|
|
The email, git and sciteco lexer configurations are bundled even
without the LEXILLA option.
|
|
--without-lexilla
They don't require Lexilla, so it makes no sense not to exclude them.
|
|
Fixes `make distcheck` and CI builds.
|
|
This fixes building of the new tutorial.woman on Ubuntu.
|
|
|