summaryrefslogtreecommitdiff
path: root/usr.bin/mg
diff options
context:
space:
mode:
authorlum <lum@cvs.openbsd.org>2012-06-18 09:19:22 +0000
committerlum <lum@cvs.openbsd.org>2012-06-18 09:19:22 +0000
commit882563f92e4625c9c92efeaee641ae9ef9d730b8 (patch)
tree4da36af9e8677ef88280c2c4f9473b443f0338ba /usr.bin/mg
parent35d75c80cd55e2f08ec65a3773447f6655c0c8bb (diff)
Removing this 'if' statement allows dired buffers to not have their
forward and backward line pointers pointing to the same line, causing mg to spin when asked to split the window. This happens if a directory is opened via the command line sequentially first, and other windows need to opened afterwards (for other files). Since the information within this 'if' statement is updated later for files and directories I can see no problem with removing this. No regressions viewable either. Problem reported by and diff tested by jasper@
Diffstat (limited to 'usr.bin/mg')
-rw-r--r--usr.bin/mg/file.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/mg/file.c b/usr.bin/mg/file.c
index 7e920598a8a..acf64c1e4d2 100644
--- a/usr.bin/mg/file.c
+++ b/usr.bin/mg/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.80 2012/05/25 04:56:58 lum Exp $ */
+/* $OpenBSD: file.c,v 1.81 2012/06/18 09:19:21 lum Exp $ */
/* This file is in the public domain. */
@@ -222,12 +222,10 @@ readin(char *fname)
for (wp = wheadp; wp != NULL; wp = wp->w_wndp) {
if (wp->w_bufp == curbp) {
- if ((fisdir(fname)) != TRUE) {
- wp->w_dotp = wp->w_linep = bfirstlp(curbp);
- wp->w_doto = 0;
- wp->w_markp = NULL;
- wp->w_marko = 0;
- }
+ wp->w_dotp = wp->w_linep = bfirstlp(curbp);
+ wp->w_doto = 0;
+ wp->w_markp = NULL;
+ wp->w_marko = 0;
}
}