[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/typescript-mode 7d80174b23 216/222: Skip past ? and ! in t
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/typescript-mode 7d80174b23 216/222: Skip past ? and ! in typescript--compute-member-expression-indent |
Date: |
Sun, 6 Feb 2022 16:59:33 -0500 (EST) |
branch: elpa/typescript-mode
commit 7d80174b23fb737c240993c22ebe9b90b9e2f202
Author: Zachary Romero <zacromero@posteo.net>
Commit: Zachary Romero <zacromero@posteo.net>
Skip past ? and ! in typescript--compute-member-expression-indent
---
typescript-mode-general-tests.el | 8 ++++++++
typescript-mode.el | 2 ++
2 files changed, 10 insertions(+)
diff --git a/typescript-mode-general-tests.el b/typescript-mode-general-tests.el
index 3ccdb0539f..c900bc01b0 100644
--- a/typescript-mode-general-tests.el
+++ b/typescript-mode-general-tests.el
@@ -204,6 +204,14 @@ a severity set to WARNING, no rule name."
(forward-char 1)
(should (= 8 (current-column)))))
+(ert-deftest correctly-indents-dot-dot-after-exclamation ()
+ (with-temp-buffer
+ (ignore-errors (typescript-mode))
+ (insert "situation('8/8/8/8/8/8/8/R3K2R w - - 0 1')?.")
+ (forward-char -1)
+ (newline-and-indent)
+ (should (= 4 (current-column)))))
+
(ert-deftest indentation-does-not-hang-on-multiline-string ()
"Testcase for https://github.com/ananthakumaran/typescript.el/issues/20"
diff --git a/typescript-mode.el b/typescript-mode.el
index ef4f0e55b9..8c1b7eb230 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -2308,6 +2308,8 @@ starts the member expression.
(typescript--backward-syntactic-ws)
(while (eq (char-before) ?\;)
(backward-char))
+ (when (memq (char-before) '(?\? ?\!))
+ (backward-char))
(while (memq (char-before) '(?\] ?} ?\) ?>))
(if (not (eq (char-before) ?>))
(backward-list)
- [nongnu] elpa/typescript-mode 8910e12525 129/222: Add autoload cookie with safe-local-var for typescript-indent-level, (continued)
- [nongnu] elpa/typescript-mode 8910e12525 129/222: Add autoload cookie with safe-local-var for typescript-indent-level, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode fbaad515c9 132/222: Merge pull request #89 from Ailrun/update-jsdoc-tests, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 32146510b8 147/222: Pin our dist to Trusty., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 706f938aef 155/222: force generic regex to include symbol before it (#119), ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode e38492f1cd 179/222: Extend Type-name to support namespace-prefixes., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 7040961735 166/222: Highlight type-names in type-casts too., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode de1a696c3c 174/222: Ignore errors from backward-list, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode a7cd7a92a5 167/222: fix(font-lock): prefer fontifying constants over keywords, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 1767de1095 180/222: Merge pull request #129 from emacs-typescript/feature/types-in-declarations, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 0d5c941c4c 195/222: * typescript-mode.el: Use EOS instead of EOL for auto mode regexp., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 7d80174b23 216/222: Skip past ? and ! in typescript--compute-member-expression-indent,
ELPA Syncer <=
- [nongnu] elpa/typescript-mode 6918f3f6d7 212/222: Merge pull request #154 from emacs-typescript/feature/build-tasks, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 13e6da6c57 219/222: Merge pull request #157 from rsimoes/patch-1, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode a6e0eac105 029/222: Fix wrong cursor position in `typescript-indent-line`, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 0f41709e15 074/222: Fontify @type properly and allow jsdoc one-liners., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 90d9758cfb 035/222: Revert "Fix wrong cursor position in `typescript-indent-line`", ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 1cea84486f 064/222: Merge pull request #35 from lddubeau/feature/indent-return-annotations, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 9ad892fb22 061/222: Add keyword 'object', ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode e3d2fee6de 004/222: unnecessary for single package file, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 7e8b9641ae 096/222: Mark typescript indent variables as safe for file local customizations, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 813cf4fef3 069/222: Fix endless loop (hang) in indentation-code., ELPA Syncer, 2022/02/06