branch: elpa/d-mode
commit 3c7db4a7464a30732d3dd3eb19b5c81415635532
Author: Vladimir Panteleev <[email protected]>
Commit: Vladimir Panteleev <[email protected]>
Fix imenu context with multiple nesting
Don't rewrite lists that we save elsewhere.
---
d-mode.el | 4 ++--
tests/imenu2.d | 7 ++++++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index e8912a2..42a0a34 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -7,7 +7,7 @@
;; Maintainer: Russel Winder <[email protected]>
;; Vladimir Panteleev <[email protected]>
;; Created: March 2007
-;; Version: 201909102143
+;; Version: 201909102153
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "25.1"))
@@ -953,7 +953,7 @@ Each list item should be a regexp matching a single
identifier."
(if res
(list e res)
(cons e id-start))))
- (nreverse d-fqpath))
+ (reverse d-fqpath))
res)
d-spots)))))))))
(nreverse d-spots)))
diff --git a/tests/imenu2.d b/tests/imenu2.d
index c10a5c0..7607d68 100644
--- a/tests/imenu2.d
+++ b/tests/imenu2.d
@@ -1,6 +1,6 @@
// #min-version: 26.1
// #run: (d-test-get-imenu-lines)
-// #out: (5 6 13 18 20 24 28 33 37 40 42 46 49 50 51 52)
+// #out: (5 6 13 18 20 24 28 33 37 40 42 46 49 50 51 52 54 56)
void run(Parameter!("foo()") command) {}
Parameter!("foo()") run(string command) {}
@@ -50,4 +50,9 @@ class S
~this() {}
static this() {}
static ~this() {}
+
+ struct X
+ {
+ int nun();
+ }
}