From 87afde0ea4bdd177028ddb34c05672dacd8b3e66 Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Thu, 21 Apr 2011 06:43:02 +0000 Subject: [PATCH] Fix our use of $em_tab_dist after it was changed to 0 for 'turned of'. Closes SF bug #3290514. --- ReleaseNotes | 7 ++++++- source/smartIndent.c | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ReleaseNotes b/ReleaseNotes index 98425b2..57ff4e4 100644 --- a/ReleaseNotes +++ b/ReleaseNotes @@ -1,7 +1,7 @@ Release Notes for NEdit Version 5.5, October 2004 -$Id: ReleaseNotes,v 1.68 2010/07/05 06:23:59 lebert Exp $ +$Id: ReleaseNotes,v 1.69 2011/04/21 06:43:02 lebert Exp $ This file contains last minute notes to users about the release, which are not included in the documentation or README files included with the distribution @@ -20,6 +20,11 @@ New Features in $NEXT_VERSION - The new macro function filename_dialog() can be used to query a file name from the user by using the usual file selection dialog. +Changes in behaviour in $NEXT_VERSION + + - The value of $em_tab_dist has changed when the emulation is turned off. + It is now 0, which was anyway a value for 'turned off'. (See SF bug + #1560892 and #3290514) Bugs fixed in $NEXT_VERSION diff --git a/source/smartIndent.c b/source/smartIndent.c index 61c9867..c1f91f0 100644 --- a/source/smartIndent.c +++ b/source/smartIndent.c @@ -1,4 +1,4 @@ -static const char CVSID[] = "$Id: smartIndent.c,v 1.41 2008/10/08 08:37:41 lebert Exp $"; +static const char CVSID[] = "$Id: smartIndent.c,v 1.42 2011/04/21 06:43:02 lebert Exp $"; /******************************************************************************* * * * smartIndent.c -- Maintain, and allow user to edit, macros for smart indent * @@ -170,7 +170,7 @@ return measureIndent($1) + defaultIndent($pyIndentDist)\n", NULL}, $caseDepth = 2\n\ define matlabNewlineMacro\n\ {\n\ - if ($em_tab_dist == -1)\n\ + if (!$em_tab_dist)\n\ tabsize = $tab_dist\n\ else\n\ tabsize = $em_tab_dist\n\ @@ -324,7 +324,7 @@ define defaultIndent {\n\ \n\ if ($1 != \"default\")\n\ return $1\n\ - if ($em_tab_dist != -1)\n\ + if ($em_tab_dist)\n\ return $em_tab_dist\n\ if ($tab_dist <= 8)\n\ return $tab_dist\n\ @@ -340,7 +340,7 @@ define defaultContIndent {\n\ \n\ if ($1 != \"default\")\n\ return $1\n\ - if ($em_tab_dist != -1)\n\ + if ($em_tab_dist)\n\ return $em_tab_dist * 2\n\ if ($tab_dist <= 8)\n\ return $tab_dist * 2\n\ -- 2.11.4.GIT