[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone: 2cb1b24a0643e108f8b20444490
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone: 2cb1b24a0643e108f8b2044449049053de601ac0 |
Date: |
Thu, 8 Mar 2012 16:51:00 +0100 (CET) |
revision: 2cb1b24a0643e108f8b2044449049053de601ac0
date: 2012-03-08T15:51:34
author: Richard Hopkins <address@hidden>
branch: net.venge.monotone
changelog:
Make terminal_width for win32 consistent with unix and correct documentation
The unix version of terminal_width queries for the actual width, and on
failure returns 0; which means it's unlimited, see platform.hh. This is OK
as it's picked up on and corrected by guess_terminal_width which is used
throughout the code base and from Lua hooks.
The documentation for guess_terminal_width was slightly wrong as a width of
80 is only used on win32 systems; unix used 72, see default_terminal_width
in constants.hh.
NOTE:
Everywhere uses guess_terminal_width except for tick_write_count::write_ticks
which still uses terminal_width; I'm not sure at the moment if that's
intentional or an accident so I've left it.
manifest:
format_version "1"
new_manifest [ce7dcde6392fe24513211a6674a9966870d42d1d]
old_revision [46d59b9242bfcc6d147698168611cfa416ac62ea]
patch "doc/monotone.texi"
from [b93a39c40870fce709e383709d45003fb638bc0f]
to [5d233f3ae943361cf83d586209e6ff04c083c9de]
patch "src/win32/terminal.cc"
from [036785c31b25174a945c09d04030552377394221]
to [8aa0b4610e4683fea74c0378e6d934d2829f2799]
============================================================
--- doc/monotone.texi b93a39c40870fce709e383709d45003fb638bc0f
+++ doc/monotone.texi 5d233f3ae943361cf83d586209e6ff04c083c9de
@@ -12467,7 +12467,7 @@ @section Additional Lua Functions
@item guess_terminal_width()
Returns the size of the terminal window as number or a sane default
-(80) if the information cannot be retrieved.
+(72) if the information cannot be retrieved.
@item include(@var{scriptfile})
============================================================
--- src/win32/terminal.cc 036785c31b25174a945c09d04030552377394221
+++ src/win32/terminal.cc 8aa0b4610e4683fea74c0378e6d934d2829f2799
@@ -49,8 +49,7 @@ unsigned int terminal_width()
}
}
- // default to 80 columns if the width query failed.
- return 80;
+ return 0;
}
// Local Variables:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone: 2cb1b24a0643e108f8b2044449049053de601ac0,
code <=