+
+setcmd(new)
+char new;
+{
+ if (new && !incmd) {
+ if (!terse)
+ wwadd(cmdwin, &wwhead);
+ if (selwin != 0)
+ wwcursor(selwin, 1);
+ wwcurwin = 0;
+ } else if (!new && incmd) {
+ if (!terse) {
+ wwdelete(cmdwin);
+ reframe();
+ }
+ if (selwin != 0)
+ wwcursor(selwin, 0);
+ wwcurwin = selwin;
+ }
+ incmd = new;
+}
+
+setterse(new)
+char new;
+{
+ if (incmd)
+ if (new && !terse) {
+ wwdelete(cmdwin);
+ reframe();
+ } else if (!new && terse)
+ wwadd(cmdwin, &wwhead);
+ terse = new;
+}
+
+/*
+ * Set the current window.
+ */
+setselwin(w)
+struct ww *w;
+{
+ if (selwin == w)
+ return;
+ lastselwin = selwin;
+ front(selwin = w, 1);
+}