nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] indent/unindent overhaul (including undo/redo support)


From: David Ramsey
Subject: [Nano-devel] indent/unindent overhaul (including undo/redo support)
Date: Sat, 8 Jul 2017 21:30:35 -0500

After studying the indent/unindent code and looking at bug #47684, I've
come up with the following patch set against current git (5bc4abe) which
should accomplish the following:

* The behavior of indent/unindent should be more consistent.  Indenting
will add tabs to the beginnings of the lines it affects (or full tabs'
worth of spaces if the --tabstospaces option is used).  Unindenting will
remove tabs from the beginnings of the lines it affects (if the lines
begin with tabs; it will remove them whether they consist of actual tabs
or full tabs' worth of spaces).

* Indent/unindent should be undoable and redoable now.

The first two patches in the set don't actually fix any bugs or change
any behavior, but clean up the functions' design to make them easier to
adapt.  Also, in order to properly undo and redo unindent on a block
with mixed tab types, I had to extend the group undo structure to allow
for marking certain lines in the group but not others for different behavior.

Note that I'm still testing this, and the documentation is not yet
updated to remove mentions of nano's inability to undo/redo
indent/unindent.

Attachment: indent-overhaul.zip
Description: Zip archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]