From ed02216378a3ea58ac69f40ae42171656be8dd75 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Thu, 3 Aug 2000 16:54:11 +0000 Subject: [PATCH] Added recursive loop check git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@156 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 1 + po/de.gmo | Bin 16438 -> 16438 bytes po/de.po | 2 +- po/es.gmo | Bin 16401 -> 16401 bytes po/es.po | 2 +- po/fi.gmo | Bin 15015 -> 15015 bytes po/fi.po | 2 +- po/fr.po | 2 +- po/id.gmo | Bin 14794 -> 14794 bytes po/id.po | 2 +- po/it.gmo | Bin 13045 -> 13045 bytes po/it.po | 2 +- po/nano.pot | 26 +++++++++++++------------- winio.c | 10 +++++++++- 14 files changed, 29 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d92049c..59945c5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,7 @@ CVS code - Added check for current line "running" off the screen. Hopefully this will not cause any recursive lockups. (Who am I kidding, of course it will!) + - Added check to stop infinite loop calling edit_update. edit_update() - Rewritten, hopefully this will remove a lot of the scrolling the cursor back and forth needlessly. diff --git a/po/de.gmo b/po/de.gmo index 5f3e443a423ba763237ccb7be9eab0b7a2260d13..e7d30f3e549b6d80beefad6245476eccb8cc335f 100644 GIT binary patch delta 25 gcmdniz__h}al;i=E(=`)Lj^+%D\n" "Language-Team: German \n" diff --git a/po/es.gmo b/po/es.gmo index ee8d002262cad5ef0d7c9b29b5ca13209a5f82d9..7c1fa0f6cd6301364f50c86777e989239aaf84f8 100644 GIT binary patch delta 25 gcmbQ(z&Npial>gR delta 25 gcmbQ(z&Npial>g\n" "Language-Team: Spanish \n" diff --git a/po/fi.gmo b/po/fi.gmo index 47e442254586b22352e8544260298b496376cc0e..ef2e2996c667d68513fc6c13176b8448d84b8bb6 100644 GIT binary patch delta 23 fcmZ2py1aD5PGv3&T?0b}LklY-i_M3XpNIhfY7Pih delta 23 fcmZ2py1aD5PGv50U1LK90}Crtv(1N\n" "Language-Team: Finnish \n" diff --git a/po/fr.po b/po/fr.po index d7d2630e..5492ba85 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.8.9\n" -"POT-Creation-Date: 2000-07-31 08:56-0400\n" +"POT-Creation-Date: 2000-08-01 18:28-0400\n" "PO-Revision-Date: 2000-07-09 01:32+0100\n" "Last-Translator: Clement Laforet \n" "Language-Team: French \n" diff --git a/po/id.gmo b/po/id.gmo index 1a2d3f4871d564abfe9d8b21dff1156acc6d43d6..9f312a2f9e5ea9a2f5773989f88e3d6a6ab1d3de 100644 GIT binary patch delta 23 ecmX?Ae5!bZh%%Rju7RO~p@o%^#b!C>HDUl^AO{ry delta 23 ecmX?Ae5!bZh%%SCuCbwlfrXW+*=9NAHDUl^HwPC0 diff --git a/po/id.po b/po/id.po index 0fbb2ca7..203cecda 100644 --- a/po/id.po +++ b/po/id.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: nano-0.9.10\n" -"POT-Creation-Date: 2000-07-31 08:56-0400\n" +"POT-Creation-Date: 2000-08-01 18:28-0400\n" "PO-Revision-Date: 2000-06-08 20:56+07:00\n" "Last-Translator: Tedi Heriyanto \n" "Language-Team: Indonesian \n" diff --git a/po/it.gmo b/po/it.gmo index 26364f5593bbcd3af43eeb7505419d3f1873ca35..521875d995eac69818139c9e683cb79a59891822 100644 GIT binary patch delta 23 fcmeyG`ZaaKdpRx(T?0b}LklY-i_Jgf{s;pAc|!?E delta 23 fcmeyG`ZaaKdpRz1U1LK90}Crtv&}!{{s;pAd0Gid diff --git a/po/it.po b/po/it.po index 11105eb0..de9997e7 100644 --- a/po/it.po +++ b/po/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.8.7\n" -"POT-Creation-Date: 2000-07-31 08:56-0400\n" +"POT-Creation-Date: 2000-08-01 18:28-0400\n" "PO-Revision-Date: 2000-03-03 04:57+0100\n" "Last-Translator: Daniele Medri \n" "MIME-Version: 1.0\n" diff --git a/po/nano.pot b/po/nano.pot index d42f57f0..ca8eb435 100644 --- a/po/nano.pot +++ b/po/nano.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-07-31 08:56-0400\n" +"POT-Creation-Date: 2000-08-03 12:58-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -344,7 +344,7 @@ msgid "Case Sens" msgstr "" #: global.c:282 global.c:301 global.c:311 global.c:327 global.c:331 -#: global.c:337 winio.c:975 +#: global.c:337 winio.c:983 msgid "Cancel" msgstr "" @@ -758,50 +758,50 @@ msgstr "" msgid "Modified" msgstr "" -#: winio.c:891 +#: winio.c:899 #, c-format msgid "Moved to (%d, %d) in edit buffer\n" msgstr "" -#: winio.c:902 +#: winio.c:910 #, c-format msgid "current->data = \"%s\"\n" msgstr "" -#: winio.c:945 +#: winio.c:953 #, c-format msgid "I got \"%s\"\n" msgstr "" -#: winio.c:970 +#: winio.c:978 msgid "Yes" msgstr "" -#: winio.c:972 +#: winio.c:980 msgid "All" msgstr "" -#: winio.c:974 +#: winio.c:982 msgid "No" msgstr "" -#: winio.c:1110 +#: winio.c:1118 #, c-format msgid "do_cursorpos: linepct = %f, bytepct = %f\n" msgstr "" -#: winio.c:1114 +#: winio.c:1122 msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)" msgstr "" -#: winio.c:1238 +#: winio.c:1246 msgid "Dumping file buffer to stderr...\n" msgstr "" -#: winio.c:1240 +#: winio.c:1248 msgid "Dumping cutbuffer to stderr...\n" msgstr "" -#: winio.c:1242 +#: winio.c:1250 msgid "Dumping a buffer to stderr...\n" msgstr "" diff --git a/winio.c b/winio.c index 1a2c0e40..528b9064 100644 --- a/winio.c +++ b/winio.c @@ -822,6 +822,7 @@ void center_cursor(void) /* Refresh the screen without changing the position of lines */ void edit_refresh(void) { + static int noloop = 0; int lines = 0, i = 0, currentcheck = 0; filestruct *temp, *hold = current; @@ -839,8 +840,15 @@ void edit_refresh(void) temp = temp->next; lines++; } - if (!currentcheck) /* Then current has run off the screen... */ + /* If noloop == 1, then we already did an edit_update without finishing + this function. So we don't run edit_update again */ + if (!currentcheck && !noloop) /* Then current has run off the screen... */ + { edit_update(current, CENTER); + noloop = 1; + } + else if (noloop) + noloop = 0; if (lines <= editwinrows - 1) while (lines <= editwinrows - 1) { -- 2.39.5