From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61626: 29.0.60; The indentation of switch case is broken on typescript-ts-mode and tsx-ts-mode Date: Sat, 25 Feb 2023 07:12:49 +0100 Message-ID: <91CDFA4A-85CF-45D0-B36E-02D5534D7405@thornhill.no> References: Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33100"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61626@debbugs.gnu.org To: Yuan Fu , Eason Huang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 25 07:13:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVnoA-0008RJ-6G for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Feb 2023 07:13:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVnnw-0005YV-86; Sat, 25 Feb 2023 01:13:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVnnq-0005Y9-Rq for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2023 01:13:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVnnq-0002ZS-Ho for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2023 01:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVnnq-0000pt-22 for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2023 01:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Feb 2023 06:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61626 X-GNU-PR-Package: emacs Original-Received: via spool by 61626-submit@debbugs.gnu.org id=B61626.16773055783202 (code B ref 61626); Sat, 25 Feb 2023 06:13:02 +0000 Original-Received: (at 61626) by debbugs.gnu.org; 25 Feb 2023 06:12:58 +0000 Original-Received: from localhost ([127.0.0.1]:38844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVnnl-0000pa-T0 for submit@debbugs.gnu.org; Sat, 25 Feb 2023 01:12:58 -0500 Original-Received: from out-45.mta1.migadu.com ([95.215.58.45]:40878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVnni-0000pP-Vk for 61626@debbugs.gnu.org; Sat, 25 Feb 2023 01:12:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1677305573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IBZ3zWEQ00l1ebK8z8ieOCam5QNzw/GCmbyOy+xcOu8=; b=TzTdoNIuTKUKt1AnijpWWqdhebV/WoOregBMBcPMfy9K7QrYpsTiO3S7vqLvfXVO4BuOdI 1H7Q1OUehzwTROwhx1MCX/A5tAq+i1nkSWK3wgIxwM7wq30o3l4DAvMJc44QnQHIll9goz jZP13oVsQzFS3dvJ/qouWdXDu9oRT2lfAEmr4VkWnTK27lR+iV+LDbfxMO3Z7bX27SxrVC gSpk7qGGFr3u8awkQZwYMNPMWexC8fqHSq42cAeEMV9f/qcXadgTEqhKLLWScmMsqdJJj3 yjI2dYjMIVKp4PD9CfEPhsom2v+LWD30YFhoF7DdiAqkEDyyAZH4Tfgeoo+aLQ== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: X-Migadu-Flow: FLOW_OUT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256685 Archived-At: On 25 February 2023 06:00:45 CET, Yuan Fu wrote: > >Eason Huang writes: > >> Hello Theodor and Emacs dev team, >> >> Recently I found that the indentation is broken in typescript-ts-mode >> and tsx-ts-mode=2E When I press RET (M-x newline) after the ':' in the >> case clause, it will always indent to the the same position of previous= e line=2E >> >> For example: >> In typescript-ts-mode and tsx-ts-mode will get this result as below: >> >> ``` >> let day: number =3D 1; >> >> switch (day) { >> case 0: >> console=2Elog("It is a Sunday=2E"); >> break; >> case 1: >> console=2Elog("It is a Monday=2E"); >> break; >> default: >> console=2Elog("No such day exists!"); >> break; >> } >> ``` >> expected: >> >> ``` >> let day: number =3D 1; >> >> switch (day) { >> case 0: >> console=2Elog("It is a Sunday=2E"); >> break; >> case 1: >> console=2Elog("It is a Monday=2E"); >> break; >> default: >> console=2Elog("No such day exists!"); >> break; >> } >> ``` >> >> steps to reprodue: >> >> 1=2E start emacs with `emacs -Q` >> 2=2E C-x C-f ~/test=2Etsx to open a test=2Etsx >> 3=2E M-x typescript-ts-mode >> 4=2E input the exmaple code mentioned above >> 5=2E you will see the result=2E > >The following patch should fix this, Theo, WDYT? > >Yuan > This is already fixed:)