| Commit message (Collapse) | Author | Age |
|
|
|
| |
Fixes pazz/alot#955
|
| |
|
|
|
|
| |
They are the same, except xrange returns an iterator instead of a list.
|
|
|
|
|
|
|
|
|
|
| |
This patch replaces a large number (but not all) unused arguments with
the standard ``_`` placeholder. This has the advantage of signaling that
these values are unused.
There are a number of places that I've chosen not to apply this, largely
in methods that have publicly define signatures that they inherit
(usually from urwid).
|
|
|
|
|
|
| |
This patch changes an assertion to avoid building a list in memory by
using dict.keys() and then concatenating it (building a second list in
memory). This is both faster and uses less memory.
|
|
|
|
|
|
|
|
| |
This had the advantage of being more readable to people without a
functional programming background, and it avoids the need to use lambdas
which are both slow and have many corners in python. In a few cases it
also allows us to use a generator expression instead of a materialized
list, which save some memory.
|
| |
|
|\
| |
| | |
Save command line history across sessions
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The option allows to limit the size of recent command line entries that are
store on disk.
|
| |
| |
| |
| |
| |
| | |
Initialize the command history with lines from
${XDG_CACHE_HOME:-~/.cache}/alot at startup. Write the current history to the
file again during shutdown.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a number of cases of mutable keyword arguments (list and dict
in this case). Mutable keyword arguments are rather dangerous, since any
mutation of the default value is persistent, which will inevitably lead
to bugs.
For example, imagine this code:
def func(def=[]):
def.append('foo')
return def
>>> func()
['foo']
>>> func()
['foo', 'foo']
This is almost certainly not what was intended. This code generally uses
the idiom of setting the default value to None, and then assigning with
or `value = value or []` which will replace value with the empty list
(or dict) when value is falsey, like None or another empty list.
|
| |
|
| |
|
|
|
|
|
|
| |
- use relative imports if possible
- group imports into standard library, third party, and alot modules
- sort imports alphabetically
|
| |
|
|
|
|
|
|
|
|
| |
Refreshing non-search buffers (eg the thread view) can have undesired
effects. This defensively only refreshes when the search
buffer is visible. (fixes #871)
Signed-off-by: Dimitrios Semitsoglou-Tsiapos <kmhzsem@gmx.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This ensures the default initial command as given by the
`initial_command` config option will be interpreted as
command*line* as expected, and not as single command.
As a result, one can now use e.g.
initial_command = search A ; search B
issue: #698
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ensures that calls to commands.commandfactory
are done just before these are applied:
In command sequences, some previous cmd might have changed
the mode, which in turn influences the commandfactory
as some commandstrings are interpreted differently in different modes.
This patch ensures that one command has completed before a next
one gets instantiated.
Also, this adds a global error handler for command sequence deferreds.
cf issue #629
|
| |
|
|
|
|
|
|
|
| |
When a pre or post command hook is called it gets
the Command instance it belongs to as keyword parameter "cmd".
This allows e.g. the post hook of TagCommands to access the
query string used in this particular instance.
|
| |
|
|
|
|
| |
and obsolete commands.globals.CommandSequenceCommand
|
|
|
|
|
|
|
|
| |
being run
Conflicts:
alot/commands/globals.py
alot/ui.py
|
|
|
|
| |
update() call causes several hundred ms delay for each keypress. Removing it causes no immediately observable differences of behaviour.
|
|
|
|
| |
mostly automatically fixed
|
|
|
|
|
|
|
|
| |
this makes the CompleteEdit widget handle errors
raised during completions by passing them on to
a 'on_error' callback given to its constructor.
This is then used in UI.prompt.
|
| |
|
|
|
|
| |
furthermore, the special treatment of individual commands has been removed
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
also, with this a pre-command-hook can cancel the further
execution of the command by raising an Exception.
cf. issue #395
|
| |
| |
| |
| | |
.. which got lost during a previous rebase
|
| | |
|
| |
| |
| |
| | |
cf issue # 563
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
... commands. At some point we might want to add a command
history for an undo feature. For this I'd keep a history of
the applied Command objects and in reverse order call its .undo() method.
For this to work we need one Command object for each application.
If however we re-use a Command object using 'repeat' we'd most certainly lose
local information on how to undo the first application..
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The UI object now saves the last executed command (except for
RepeatCommands themselves and Promt- and FlushCommands, since they are
not user invoked, intended actions). The RepeatCommand then applies the
stored command again.
This is comparable to the . in vim, so I would recommend you add this
line to your config ;)
. = repeat
|