You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/07/06 20:17:13 UTC

svn commit: r1358328 - /subversion/trunk/subversion/svn/file-merge.c

Author: stsp
Date: Fri Jul  6 18:17:12 2012
New Revision: 1358328

URL: http://svn.apache.org/viewvc?rev=1358328&view=rev
Log:
* subversion/svn/file-merge.c
  (get_term_width): Always return at least 80 columns width. Other output
   from 'svn' tends to assume at least 80 columns width, too (e.g. the
   interactive conflict resolution prompts do).

Modified:
    subversion/trunk/subversion/svn/file-merge.c

Modified: subversion/trunk/subversion/svn/file-merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/file-merge.c?rev=1358328&r1=1358327&r2=1358328&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/file-merge.c (original)
+++ subversion/trunk/subversion/svn/file-merge.c Fri Jul  6 18:17:12 2012
@@ -295,6 +295,8 @@ get_term_width(void)
       struct winsize ws;
 
       if (ioctl(fd, TIOCGWINSZ, &ws) != -1)
+        if (ws.ws_col < 80)
+          return 80;
         return ws.ws_col;
     }
 #endif
@@ -310,8 +312,10 @@ get_term_width(void)
           svn_error_clear(err);
           return 80;
         }
-      else
-        return cols;
+      if (cols < 80)
+        return 80;
+      return cols;
+
     }
   else
     return 80;