Get rid of lack of update when searching andmark is set
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@185 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
diff --git a/BUGS b/BUGS
index d52f76b..a8cccc8 100644
--- a/BUGS
+++ b/BUGS
@@ -51,6 +51,8 @@
written out to disk when saved..... (37). [FIXED]
- Page up and page down do not work the same way as Pico (# of lines). (38)
[FIXED]
+- When doing a search and the marker is set, the screen does not always
+ properly update the inverted text (39). [FIXED]
** Open BUGS **
- Marked cutting sometimes leaves a newline in the file unintelligently,
diff --git a/ChangeLog b/ChangeLog
index 300a481..5cee4e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,15 @@
CVS Code
+- winio.c:
+ total_refresh()
+ - Added edit_refresh() call to actually update the screen if messy.
+ edit_refresh_clearok()
+ - New function, does a total update for edit refresh, needed to fix
+ lack of reversed text on searching with MARK_ISSET.
+- search.c:
+ search_abort()
+ - Now calls edit_refresh_clearok when MARK_ISSET to handle screen
+ ugliness bug (reported by Ken Tyler).
+
nano-0.9.16 - 08/09/2000
- cut.c:
do_cut_text()
diff --git a/po/nano.pot b/po/nano.pot
index d49cc4c..df108f8 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-08-07 11:03-0400\n"
+"POT-Creation-Date: 2000-08-18 23:52-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -344,7 +344,7 @@
msgstr ""
#: global.c:285 global.c:304 global.c:314 global.c:330 global.c:334
-#: global.c:340 winio.c:984
+#: global.c:340 winio.c:994
msgid "Cancel"
msgstr ""
@@ -691,47 +691,47 @@
msgid "Search Wrapped"
msgstr ""
-#: search.c:241
+#: search.c:243
#, c-format
msgid "Replaced %d occurences"
msgstr ""
-#: search.c:243
+#: search.c:245
msgid "Replaced 1 occurence"
msgstr ""
-#: search.c:378 search.c:399 search.c:422
+#: search.c:380 search.c:401 search.c:424
msgid "Replace Cancelled"
msgstr ""
-#: search.c:395
+#: search.c:397
#, c-format
msgid "Replace with [%s]"
msgstr ""
#. last_search is empty
-#: search.c:420
+#: search.c:422
msgid "Replace with"
msgstr ""
-#: search.c:461
+#: search.c:463
msgid "Replace this instance?"
msgstr ""
#. Ask for it
-#: search.c:512
+#: search.c:514
msgid "Enter line number"
msgstr ""
-#: search.c:514
+#: search.c:516
msgid "Aborted"
msgstr ""
-#: search.c:534
+#: search.c:536
msgid "Come on, be reasonable"
msgstr ""
-#: search.c:539
+#: search.c:541
#, c-format
msgid "Only %d lines available, skipping to last line"
msgstr ""
@@ -758,50 +758,50 @@
msgid "Modified"
msgstr ""
-#: winio.c:900
+#: winio.c:910
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr ""
-#: winio.c:911
+#: winio.c:921
#, c-format
msgid "current->data = \"%s\"\n"
msgstr ""
-#: winio.c:954
+#: winio.c:964
#, c-format
msgid "I got \"%s\"\n"
msgstr ""
-#: winio.c:979
+#: winio.c:989
msgid "Yes"
msgstr ""
-#: winio.c:981
+#: winio.c:991
msgid "All"
msgstr ""
-#: winio.c:983
+#: winio.c:993
msgid "No"
msgstr ""
-#: winio.c:1119
+#: winio.c:1129
#, c-format
msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
msgstr ""
-#: winio.c:1123
+#: winio.c:1133
msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)"
msgstr ""
-#: winio.c:1247
+#: winio.c:1257
msgid "Dumping file buffer to stderr...\n"
msgstr ""
-#: winio.c:1249
+#: winio.c:1259
msgid "Dumping cutbuffer to stderr...\n"
msgstr ""
-#: winio.c:1251
+#: winio.c:1261
msgid "Dumping a buffer to stderr...\n"
msgstr ""
diff --git a/proto.h b/proto.h
index a55bc9a..a9f4955 100644
--- a/proto.h
+++ b/proto.h
@@ -80,7 +80,7 @@
void check_wrap(filestruct * inptr, char ch);
void dump_buffer(filestruct * inptr);
void align(char **strp);
-void edit_refresh(void);
+void edit_refresh(void), edit_refresh_clearok(void);
void edit_update(filestruct * fileptr, int topmidbot);
void update_cursor(void);
void delete_node(filestruct * fileptr);
diff --git a/search.c b/search.c
index 9b2370e..e5a3b05 100644
--- a/search.c
+++ b/search.c
@@ -201,6 +201,8 @@
UNSET(KEEP_CUTBUFFER);
display_main_list();
wrefresh(bottomwin);
+ if (ISSET(MARK_ISSET))
+ edit_refresh_clearok();
#ifdef _POSIX_VERSION
if (ISSET(REGEXP_COMPILED))
diff --git a/winio.c b/winio.c
index 9a1226b..1e45011 100644
--- a/winio.c
+++ b/winio.c
@@ -863,6 +863,16 @@
}
/*
+ * Same as above, but touch the window first so everything is redrawn.
+ */
+void edit_refresh_clearok(void)
+{
+ clearok(edit, TRUE);
+ edit_refresh();
+ clearok(edit, FALSE);
+}
+
+/*
* Nice generic routine to update the edit buffer given a pointer to the
* file struct =)
*/
@@ -1074,7 +1084,7 @@
clearok(edit, FALSE);
clearok(topwin, FALSE);
clearok(bottomwin, FALSE);
-
+ edit_refresh();
return 1;
}