[meld] meldapp: Don't try to open a blank comparison tab (#193)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] meldapp: Don't try to open a blank comparison tab (#193)
- Date: Fri, 25 May 2018 21:18:26 +0000 (UTC)
commit 1c8c231002d854a92dd3ad160d64433651c926f7
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat May 26 07:14:19 2018 +1000
meldapp: Don't try to open a blank comparison tab (#193)
We have existing code in meldapp that handles this 90% fine. However,
if the user does something like always using `--diff` (which is
particularly understandable for e.g., tooling) then invocations like:
meld -n --diff a b
will result in the new tab not being focused on open, because it's not
first in the list of comparisons we're opening.
meld/meldapp.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/meld/meldapp.py b/meld/meldapp.py
index ab794731..a9e2f765 100644
--- a/meld/meldapp.py
+++ b/meld/meldapp.py
@@ -333,7 +333,7 @@ class MeldApp(Gtk.Application):
tab = None
error = None
- comparisons = [args] + options.diff
+ comparisons = [c for c in [args] + options.diff if c]
# Every Meld invocation creates at most one window. If there is
# no existing application, a window is created in do_startup().
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]