- Refactor the output in the DEBUG #ifdef. It didn't work
properly ever since this function was changed to use an int*
instead of a char*. (DLR)
+ edit_refresh()
+ - Remove apparently unneeded leaveok() calls. (David Benbennick)
GNU nano 1.3.2 - 2004.03.31
- General:
void reset_cursor(void);
void add_marked_sameline(int begin, int end, filestruct *fileptr, int y,
int virt_cur_x, int this_page);
-void edit_add(const filestruct *fileptr, const char *converted,
- int yval, size_t start);
+void edit_add(const filestruct *fileptr, const char *converted, int
+ yval, size_t start);
void update_line(const filestruct *fileptr, size_t index);
void update_cursor(void);
void center_cursor(void);
* characters. start is the column number of the first character
* of this page. That is, the first character of converted corresponds to
* character number actual_x(fileptr->data, start) of the line. */
-void edit_add(const filestruct *fileptr, const char *converted,
- int yval, size_t start)
+void edit_add(const filestruct *fileptr, const char *converted, int
+ yval, size_t start)
{
#if defined(ENABLE_COLOR) || !defined(NANO_SMALL)
size_t startpos = actual_x(fileptr->data, start);
/* Just update one line in the edit buffer. Basically a wrapper for
* edit_add().
*
- * If fileptr != current, then index is considered 0.
- * The line will be displayed starting with fileptr->data[index].
- * Likely args are current_x or 0. */
+ * If fileptr != current, then index is considered 0. The line will be
+ * displayed starting with fileptr->data[index]. Likely args are
+ * current_x or 0. */
void update_line(const filestruct *fileptr, size_t index)
{
int line;
fprintf(stderr, "edit_refresh(): edittop->lineno = %ld\n", edittop->lineno);
#endif
- /* Don't let the cursor jump around the screen while
- * updating. */
- leaveok(edit, TRUE);
-
while (nlines < editwinrows) {
update_line(foo, current_x);
nlines++;
nlines++;
}
reset_cursor();
+
/* What the hell are we expecting to update the screen if this
* isn't here? Luck? */
wrefresh(edit);
-
- /* Let the cursor jump around the screen again. */
- leaveok(edit, FALSE);
}
}
return;
if (location != TOP) {
- int goal = location == NONE ? current_y : editwinrows / 2;
+ int goal = (location == NONE) ? current_y : editwinrows / 2;
for (; goal > 0 && fileptr->prev != NULL; goal--)
fileptr = fileptr->prev;