Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
* I now understand better why the old initialization worked ;-)
By not calling initscr(), we could prevent some terminal setup
and screen clearing usually performed which would interfere with
with having a clean stdout stream.
However the Curses screen was still basically attached to the
terminal.
* That's why there was screen flickering in urxvt when calling sciteco
(even in batch mode). Also that's why calling batch-mode SciTECO
did not work from other Curses programs (including SciTECO).
* The new implementation directs Curses at /dev/null, so it will
completely stay away from /dev/tty.
* /dev/tty is associated with the Curses screen only when the
interactive mode is initialized. This works elegantly via
freopen() - there's no need to create a new Curses screen.
* This does currently not work on PDCurses where the batch mode
will still initscr() followed by endwin().
I should investigate how newterm() behaves there - especially
on Windows.
|
|
|
|
|
|
* sciteco.ico contains a 16 color 16px, a 255 color 32px and
a true color 48px version of the icon.
The first ones are good for legacy Windows versions like 2000,
while the latter one should be preferred by Windows >= 7.
* Also added the 48px version as a PNG for Linux.
But it is not installed currently, as there is no standardized
place for it and it wouldn't do much good in /usr/share/sciteco.
|
|
|
|
* It is still useful to have this in macros since you may want to
work with non-normalized file names.
For instance, env variables (including $SCITECOPATH and $SCITECOCONFIG)
may (and will probably) include backward-slash separators on Windows
|
|
* on Windows, this register contained backward slashes. This means
that macros working with that register had to cope with both
forward and backward slashes.
* The file names are still displayed in the native style by the UI
* This approach also has disadvantages: What if the user wants
to insert the current file name somewhere where "\" is expected?
However, this seems to be an unlikely case and the use can still
replace the "/" with "\" again.
* Avoid some virtual method calls in QRegisterBufferInfo
|
|
* This adds the -all-static libtool option and can be used to
link a static sciteco binary (or at least link in as few as possible
dynamic libraries)
* Esp. useful on MinGW to link in all dependant libraries (glib, libintl,
libiconv, libpdcurses, ...) statically.
A static .exe is much smaller than a dynamically linked plus all the
DLLs and is easier to relocate.
* This does not guarantee that ALL libraries are linked in dynamically.
E.g. on MinGW, the sciteco.exe will still link to MSVCRT and the Windows
system DLLs, but they already ship with Windows.
* On MinGW, even a static build will still require the gspawn-win32-helper-console.exe
which is used by glib to implement g_spawn with redirection.
We cannot get around that.
* It would be better to let this be decided by the package builder using
the standard env variables like LDFLAGS. However, this does not seem to
work well with libtool. It IS possible to define LDFLAGS="-all-static" when
calling make but this approach sucks.
|
|
* it is now redrawn once after each key press, even if the
info line has not changed.
* This is because Interface::update_info() is called very often
in interactive mode, so it makes more sense to redraw it after user
interaction (where even unnecessary delays are not noticed so easily),
than thousands of times in a macro.
* This is especially important since InterfaceCurses::update_info() now
also sets the Window title on PDCurses - this is a very costly operation.
* The same optimization was applied to InterfaceGtk where it is probably
greatly responsible for the sluggishness of the UI.
The GTK+ changes are currently UNTESTED.
|
|
* dirname and basename calculations can be done easier with
the new file_get_dirname_len()
* platform-dependant derive_dir_separator() function has been removed
|
|
ioview.h
this function is very useful in other places as well
(e.g. command line tab completion)
|
|
* use g_strconcat() instead of g_strdup_printf()
* InterfaceGtk::info_update() now longer has an arbitrary
255 byte limit on the length of the info line.
|
|
* Globbing without directory (e.g. EN*.cpp$) introduced a "./" into the
expanded file names.
It no longer does that.
* The expanded file names will have the exact same directory component
(if any) as the glob pattern.
So on Windows, the directory separators in the list of expanded files
is exactly as the user requested.
* Also fixes lexers.tes on Windows because the script assumes forward
slashes.
|
|
* this relied on Curses' control character drawing on Curses.
However it treats tab and line feed differently than other
control characters, so registers like "^Mfoo" could not be displayed
properly.
Even if we can configure Curses to display them correctly, we need
a "canonicalized", flat form of strings for other purposes (like setting
window titles. This is form is different from the formatting used
for command lines which may change anyway once we introduce Scintilla
mini buffers.
* therefore String::canonicalize_ctl() was introduced
* also set window title on PDCurses
|
|
Interface::main() was called
esp. fixes command line --help on PDCurses/win32
|
|
defined
|
|
* this makes them absolute and also resolves links on Unix
* macros can now assume the corresponding Q-regs to be absolute
* Currently this does not make a big difference since the
working directory of the SciTECO process cannot be changed.
Once I implement a command to change the working dir, this
is essential.
|
|
* The PACKAGE_URL_DEV is also mentioned in --help output and sciteco(1)
|
|
|
|
* It is no longer possible to accidentally open save point files
of the same or another SciTECO instance when typing something like
EB*.cpp$
* The use of a trailing ~ is common among editors. These files
will be recognized more easily as temporary by users.
* People will often already have VCS ignore rules for files with
trailing tilde. Therefore SciTECO savepoints will often be
already ignored by VCS.
* Since they still have a unique ".teco" prefix, they will not
be confused by other programs as backup files.
* Also mention in sciteco(1) that save point files are hidden on
Windows.
|
|
We used g_path_get_dirname() which does not always return strict prefixes
of the input file name. For file names without directory, it returns "."
(the current directory). This is useful for passing that directory to
functions expecting a proper directory (like g_dir_open()) but was
unsuitable for building file name candidates for autocompletion.
Therefore, we tried to determine if the dirname is a prefix of the filename.
This however failed for "hidden" file names beginning with dot.
All in all it is easier to calculate our own directory name based on
the previously calculated basename than to handle the current-directory
case with g_path_get_dirname(). Now we'll get "" for the current directory,
so we have to handle the empty-string-is-current-dir case.
|
|
* for historic reasons, the backspace key can be transmitted as
^H by the terminal. Some terminal emulators might do that - these
are fixed by this commit.
* Use CTL_KEY('H') instead of standard C '\b' as the former is less
ambiguous given the confusion around the backspace character.
|
|
CTL_KEY_ESC_STR
* the reason for the CTL_KEY() macro is to get the control character
resulting from a CTRL+Key press -- at least this is how SciTECO
presents these key presses.
It is also a macro and may be resolved to a constant expression,
so it can be used in switch-case statements.
Sometimes it is clearer to use standard C escape sequences (like '\t').
* CTL_KEY('[') for escape is hard to read, so I always used '\x1B' which
is even more cryptic.
|
|
* the popup resetting was done after character insertion, so typing
0EB would clear the popup immediately
* the new implementation is functionally equivalent to the
old pre-reinsertion-commandline-handling, by resetting the popup
based on the immediate editing command before insertion
|
|
* the Curses window associated with a Scinterm Scintilla view is
INDEED deleted automatically by scintilla_delete()
* The Scinterm documentation is WRONG on this.
* This has been broken in the SciTECO code for a long time.
Perhaps, for some obscure reason, this does not cause any
problems on NCurses. It results in instant segfaults on
MinGW/PDCurses though.
|
|
warnings
* Clang++ does not see that the PC will never go beyong g_assert(false),
and so reports about possible unitialized variables
|
|
we are not guaranteed to reach the start parser state
again if the command is not terminated on the rubbed out
command line
|
|
|
|
|
|
* They are harmful. I removed most of them a long time ago
but kept some for their documenting character.
However, they will always result in additional checks (runtime
penalty) when the corresponding functions get called and cannot ensure that
only the declared exceptions are thrown at compile time.
|
|
|
|
* we cannot prevent GTK from delivering the function key presses,
as we can on Curses. Therefore Cmdline::fnmacro() checks again if
function keys are enabled.
|
|
* this is a Linux/glibc-only optimization
|
|
(also replaces ^T)
* CTRL+G toggles the behaviour of the rubout (Backspace, ^W, ^U) commands:
When the so called immediate editing command modifier is enabled/active,
the rubout commands will do the opposite and insert from the rubbed out
command line.
This command is somewhat similar to Emacs' C-g command.
* The CTRL+G command also replaces the ^T immediate editing command
for auto-completing filenames in any string argument.
Now the TAB key can be used for that purpose after activating the
^G modifier.
^T is a classic TECO command that will be supported sooner or later
by SciTECO, so it's good to have it available directly.
|
|
cleanup/refactoring
* characters rubbed out are not totally removed from the command line,
but only from the *effective* command line.
* The rubbed out command line is displayed after the command line cursor.
On Curses it is grey and underlined.
* When characters are inserted that are on the rubbed out part of the command line,
the cursor simply moves forward.
NOTE: There's currently no immediate editing command for reinserting the
next character/word from the rubbed out command line.
* Characters resulting in errors are no longer simply discarded but rubbed out,
so they will stay in the rubbed out part of the command line, reminding you
which character caused the error.
* Improved Cmdline formatting on Curses UI:
* Asterisk is printed bold
* Control characters are printed in REVERSE style, similar to what
Scinterm does. The controll character formatting has thus been moved
from macro_echo() in cmdline.cpp to the UI implementations.
* Updated the GTK+ UI (UNTESTED): I did only, the most important API
adaptions. The command line still does not use any colors.
* Refactored entire command line handling:
* The command line is now a class (Cmdline), and most functions
in cmdline.cpp have been converted to methods.
* Esp. process_edit_cmd() (now Cmdline::process_edit_cmd()) has been
simplified. There is no longer the possibility of a buffer overflow
because of static insertion buffer sizes
* Cleaned up usage of the cmdline_pos variable (now Cmdline::pc) which
is really a program counter that used a different origin as macro_pc
which was really confusing.
* The new Cmdline class is theoretically 8-bit clean. However all of this
will change again when we introduce Scintilla views for the command line.
* Added 8-bit clean (null-byte aware) versions of QRegisterData::set_string()
and QRegisterData::append_string()
|
|
string-utils.cpp and string-utils.h
* also improved performance of String::append() by using g_realloc()
* added String::append() variant for non-null-terminated strings
|
|
* acts as a safe-guard against uninterrupted infinite loops
or other operations that are costly to undo in interactive mode.
If we're out of memory, it is usually too late to react properly.
This implementation tries to avoid OOMs due to SciTECO behaviour.
We cannot fully exclude the chance of an OOM error.
* The undo stack size is only approximated using the
UndoToken::get_size() method.
Other ways to measure the exact amount of allocated heap
(including size fields in every heap object or using sbrk(0) and
similar) are either costly in terms of memory or platform-specific.
This implementation does not need any additional memory per heap
object or undo token but exploits the fact that undo tokens
are virtual already. The size of an undo token is determined
at compile time.
* Default memory limit of 500mb should be OK for most people.
* The current limit can be queried with "2EJ" and set with <x>,2EJ.
This also works interactively (a bit tricky!)
* Limiting can be disabled. In this case, undo token processing
is a bit faster.
* closes #3
|
|
without a corresponding loop start (<)
* assertions were introduced very early when there was no proper error handling
in SciTECO. However it points to a macro programming error instead of
a SciTECO programming error and should not crash the editor.
* Perhaps it would be best to check for this kind of "syntax" error also
in parse-only modes. This is not done currently.
* part of the solution to issue #3
|
|
|
|
|
|
* since SCI_SETDOCPOINTER resets character representations
(should probably be submitted as a bug to Scintilla)
we have to reset the representations each time we load
a q-register into the q-reg view.
* since the SCI_SETREPRESENTION call does not do any redrawing
(and it would be very slow if it did), the lines with control
characters were laid out wrong (too much spaces).
This happened when editing a q-reg or the command-line.
* Since it is not obvious how to fix Scintilla's behaviour here,
we work around the issue by temporarily disabling the layout
cache.
|
|
* also did some whitespace cleanup in SciTECO now that tabs are
displayed properly
|
|
|
|
* the ^I command was altered to insert indention characters
rather than plain tabs always.
* The <TAB> immediate editing command was added for all
insertion arguments (I, ^I but also FR and FS)
* documentation was extended for a discussion of indention
|
|
this is because ownership of the GError may be passed to GlibError()
|
|
* when throwing GlibError(), this is taken care of automatically.
* fixes a memleak since there may be resources associated with the
GError.
|