--- /dev/null
+# Can we resize this window?
+case "$TERM" in
+ # Terminals we KNOW can't be resized.
+ cygwin|linux|sun-color)
+ export RESIZABLE=0
+ ;;
+
+ # Terminals we CANNOT know about.
+ screen*)
+ [ "$RESIZABLE" = "0" ] || RESIZABLE="$TERM"
+ export RESIZABLE
+ ;;
+
+ # Anything else we'll assume can be.
+ *)
+ export RESIZABLE="$TERM"
+ ;;
+esac
call Prep_Var("g:marksigns", 0)
call Prep_Var("g:firstsign", 100)
endif
+ call Prep_Var("g:resizable", "''")
endfun "}}}2
" Helper for status line.
let &ic = ! &ic
endfun "}}}2
+" Can we resize this window?
+fun! Can_Resize() "{{{2
+ call Iain_Vars()
+
+ if g:resizable == "0" || g:resizable == "1"
+ return g:resizable
+ endif
+
+ " Do we KNOW we can(not) resize?
+ if has("gui_running")
+ let g:resizable = 1
+ elseif $RESIZABLE == &term
+ let g:resizable = 1
+ elseif $RESIZABLE == "0"
+ let g:resizable = 0
+ else
+ " Assume we can. Allow overriding.
+ let g:resizable = 1
+ endif
+ return g:resizable
+endfun "}}}2
+
" Grow or shrink the window size.
fun! Resize_Columns(op, ...) "{{{2
if a:op == ""
return
endif
+ if ! Can_Resize()
+ return
+ endif
+
if a:0 == 0
" Vim 5 hardcodes the size of numbers column to 8.
if version >= "700"