[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/typescript-mode dd832751ab 217/222: Merge pull request #15
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/typescript-mode dd832751ab 217/222: Merge pull request #156 from zkry/fix-dot-after-exclamation-indentation |
Date: |
Sun, 6 Feb 2022 16:59:33 -0500 (EST) |
branch: elpa/typescript-mode
commit dd832751abf27f4dd098f09e2dbf69511faa38a5
Merge: c9b22f5f33 7d80174b23
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: GitHub <noreply@github.com>
Merge pull request #156 from zkry/fix-dot-after-exclamation-indentation
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 2815dd1b4b 098/222: Add option to support indented case-statements. Fixes #23 (#66), (continued)
- [nongnu] elpa/typescript-mode 2815dd1b4b 098/222: Add option to support indented case-statements. Fixes #23 (#66), ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 861d5983b6 090/222: Make the comment-start and comment-end variables local., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 4e3850dd2a 105/222: Remove logic handling preprocessor macros, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 32f5034e9d 127/222: Extract tests as general tests, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode e15e2bfa1a 131/222: Add jsdoc tests, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode c0f11efdfd 143/222: Fixing typescript--forward-expression for multiline indented string, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode a0f2c3ebd4 164/222: Reimplement template auto conversion as a post-self-insert-hook, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode b44b75dbe1 172/222: Add test case for infinite loop, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 5bf30fe8d6 175/222: Add member expressions tests involving type parameters., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 1c27fb09ed 220/222: Fix cl deprecation warning, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode dd832751ab 217/222: Merge pull request #156 from zkry/fix-dot-after-exclamation-indentation,
ELPA Syncer <=
- [nongnu] elpa/typescript-mode 4249a20d6d 187/222: Added file for indent test case, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode c5e7788ce9 044/222: Merge pull request #28 from ananthakumaran/testing, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 99c2b74ac3 059/222: Make current-column function internal., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 89d22c4e18 051/222: Don't interpret forward slash in list as operator., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 393ac6db0f 081/222: add tests for regexp font locking, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 361564c4a9 057/222: typescript-current-column: Dont cause side-effects., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode d155a4b623 063/222: Revert indent of complex parameters., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode e0b4a6cb31 055/222: Merge pull request #36 from lddubeau/feature/improved-tslint-regex, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode bce2e73cf2 107/222: Remove unused dependencies, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 7172a23d86 072/222: Add a custom predicate for flyspell-prog-mode., ELPA Syncer, 2022/02/06