Commit Graph

360 Commits

Author SHA1 Message Date
Sadrul Habib Chowdhury
ad5e07310a Merge branch 'master' into cmd-alias 2010-03-16 10:31:46 -04:00
Sadrul Habib Chowdhury
8a6abbab01 Add special rendition for silence'd windows.
The default rendition for silence'd windows in caption/hardstatus
or in the windowlist is =u (underline). Closes savannah bug #29205.
2010-03-14 23:02:37 -04:00
Sadrul Habib Chowdhury
6e67aee852 Fix a typo. 2010-03-12 19:27:09 -05:00
Sadrul Habib Chowdhury
08939ef842 Fix an invalid memory read.
Thanks a bunch to Friedrich Delgado Friedrichs for providing the valgrind logs.
2010-03-12 19:25:50 -05:00
Sadrul Habib Chowdhury
cd874b642c Make layer-resizing a bit more robust and readable
Instead of killing all overlays when resizing, just kill the ones
that cannot be resized, and the resized the rest. This fixes a bug
where the window-list (or a group-window) is aborted when
layer-size changes (because window-size changed, or
caption/hardstatus etc. was toggled). This also makes the code
robust. So if you are looking at a window/display list, and the
window-size is changed, the list won't go away.
2010-03-10 00:57:22 -05:00
Sadrul Habib Chowdhury
9d3938870c Fix compiling SIMPLESCREEN. 2010-03-09 17:05:57 -05:00
Sadrul Habib Chowdhury
2d92e194ef Fix an invalid memory read.
The window-list data gets freed when we abort the list. So read what
we need to before aborting the list.
2010-03-09 16:34:06 -05:00
Sadrul Habib Chowdhury
26c3a1a371 More fixes for -Werror=format-security. 2010-03-08 15:04:22 -05:00
Sadrul Habib Chowdhury
25ff9f7a8b Fix a hardstatus update issue.
The initial change was to fix a bug in gnome-terminal
(https://savannah.gnu.org/bugs/?23699), but that broke hardstatus
update issues on bell (https://savannah.gnu.org/bugs/?24096). So
apply a proper fix for #23699 without causing #24096.
2010-03-08 14:29:40 -05:00
Sadrul Habib Chowdhury
eb4cea75f2 Fix refresh when double-cell characters end a line
Double cell characters that end a line are not properly displayed
when there are split regions. Takeshi Banse detected the problem and
a fix for it in Savannag bug #29106. A better fix for this was
applied in the unicode++ branch, but that won't work in 'master'.
This is approximately the same fix, in a slightly different way.
2010-03-08 10:01:26 -05:00
Sadrul Habib Chowdhury
7851249fa3 Changelog. 2010-03-07 19:36:36 -05:00
Michael Scherer
261a022ce9 Fix build with -Werror=format-security
Some distributions ( mandriva for example ) use
-Werror=format-security by default when build C software to try to
enhance code quality and prevent security bugs. As the policy is to
correct all occurences of the error ( so there is no false positive,
nor question about to fix it or not ), a patch that fix the
error on gnu screen 4.0.3 have been added to the package. I have
rediffed it against latest git snapshot, to be sent upstream.

It mainly add "%s" where applicable.
2010-03-07 19:29:39 -05:00
Sadrul Habib Chowdhury
2e62d3683e Some more fixes for the window list.
Detecting when to destroy a window-list is rather complicated.
2010-03-04 21:40:37 -05:00
Sadrul Habib Chowdhury
02328ed6c8 Handle mouse events in a generic list.
Scroll wheels to scroll, left click to select.
2010-03-04 18:10:50 -05:00
Sadrul Habib Chowdhury
5a540e47c2 Fix sending mouse event to a mouse-enabled layer. 2010-03-04 18:10:05 -05:00
Sadrul Habib Chowdhury
824d214894 Fix terminating an on-window list. 2010-03-04 18:09:17 -05:00
Sadrul Habib Chowdhury
30be3fc3a1 Use intelligent screen refresh only in split regions.
When there are no splits, pausing output on a layer isn't necessary,
since it doesn't hit the performance. But we do want to continue to
pause output when there are splits to improve scrolling performance.
Fixes savannah bug #29055. Thanks to Kazuo Teramoto for reporting
the bug and testing the fix.
2010-03-04 15:39:51 -05:00
Sadrul Habib Chowdhury
b9253ef24e Do not terminate when size is reduced too much.
Height of a window can be negative, when both hardstatus and caption
are turned on, and the terminal size is reduced to one-line height.
So handle those cases more gracefully.

Fixes savannah bug #29037.
2010-03-03 11:55:39 -05:00
Sadrul Habib Chowdhury
da8e87d650 Sanity check line numbers for non-negative value.
It looks like 'ys' can be negative at times, which results in invalid
memory reads, and possibly writes. Valgrind log from Friedrich Delgado
Friedrichs in savannah bug #29050.
2010-03-03 11:18:55 -05:00
Sadrul Habib Chowdhury
48624f98db Reduce a little code duplication. 2010-02-26 12:09:31 -05:00
Sadrul Habib Chowdhury
4f28ba8c8f Some more fixes for the list management.
Make sure the allocated memory is always freed. Also, do not reference freed memory.
Thank you valgrind.
2010-02-26 11:31:19 -05:00
Sadrul Habib Chowdhury
b6dd7d8687 Print the group name in a group window. 2010-02-24 09:32:26 -05:00
Sadrul Habib Chowdhury
9a6defe5d9 Some more window-management from the window-list.
Pressing 'K' in the window-list will kill a window (after confirmation).

Also, added some notes.
2010-02-24 09:20:02 -05:00
Sadrul Habib Chowdhury
d1d0cc4d63 Allow moving windows around from the window list.
Press ',' to switch the selected window with its previous window (in
the same group). Similarly, press '.' to switch with the next
window.
2010-02-24 08:46:57 -05:00
Sadrul Habib Chowdhury
c6a9fa0077 Typo fix. 2010-02-24 06:38:36 -05:00
Sadrul Habib Chowdhury
230cee80c1 Changelog the search-ability in the windowlist. 2010-02-24 03:59:53 -05:00
Curtis Brown
fcdce5c632 Man-pages updates for -p, -T, 'stuff' and 'su'. 2010-02-24 02:39:03 -05:00
Sadrul Habib Chowdhury
42f59cca30 Typo fixes from Trent W Buck. 2010-02-24 02:32:23 -05:00
Sadrul Habib Chowdhury
3a0f074814 Simplify a little. 2010-02-24 02:30:59 -05:00
Sadrul Habib Chowdhury
ca39761807 Allow searching in the window list.
Press '/' to enter the search string, then pressing 'n' will search
forward, and 'N' will search backward. Press '/' again to change the
search string.
2010-02-24 01:36:22 -05:00
Sadrul Habib Chowdhury
24246d27ea Add some navigation shortcut in list views.
Page-up/down, home/end, ^A, ^E, ^B, ^F, ^D, ^U keys do their things.
2010-02-24 00:29:19 -05:00
Juergen Weigert
8dea5b5ab9 Reset displays before dumping a core.
If defined SHADOWPW, we may have passwd records in core, that the user
would not be able to access otherwise. In that case, we should not dump
core, as the core file would contain the passwd records, and would be
readable for the user.
We do not explicitly check for eff_uid == 0, because if his real_uid is
also 0 he could have read all this anyway. Leaving only the cases where the
two uids differ.
2010-02-23 20:43:33 -05:00
Sadrul Habib Chowdhury
1df0225993 Remove old code. 2010-02-23 20:35:03 -05:00
Sadrul Habib Chowdhury
94d954b975 Final touches to the revamped window list.
This window list should be better than the old one, mostly
code-wise, as there's yet no new functionality. However, it should
be much simpler to add typeahead search and other nifty things now
than before.
2010-02-23 20:30:53 -05:00
Sadrul Habib Chowdhury
68af85deb1 Add the navigation support back in the window list.
Pressing 'm' toggles the MRU-ness, pressing 'a' shows the list of all windows.
Still left to do: deal with nested view.
2010-02-23 15:10:21 -05:00
Sadrul Habib Chowdhury
bafc958a92 Fix the unexpected selection-change bug.
Do not remove a row from the list if it is already in the correct position.
2010-02-23 14:43:04 -05:00
Sadrul Habib Chowdhury
d9262fc589 Update the window-list when necessary.
Update the window-list whenever window ordering/etc. changes. There
is an unusual bug where the selection in a list changes
automatically when switching windows in another display. Need to
investigate this issue. Also, left to do: support nested list, and
advanced navigations introduced (e.g. toggle MRU, nestedness etc.)
2010-02-23 12:43:26 -05:00
Sadrul Habib Chowdhury
c649e67105 It makes no sense to allow a group into itself. 2010-02-22 23:36:30 -05:00
Sadrul Habib Chowdhury
04f2e53420 Revamp the window list.
The window list now uses the list-framework. The basic window list
is working. The list for a group, or nested/mru lists still need
some work. This is going to be a much simpler code than before.
2010-02-22 20:50:31 -05:00
Sadrul Habib Chowdhury
e29d6de0f8 Start working on a generic list framework.
The list of displays uses this framework. Eventually, the list of
windows, bindkeys etc. will also use this framework.

In the list of displays, you can press 'd' to detach the selected
display (and 'D' to power-detach).

Eventually, the plan is to add typeahead search in the list too.
2010-02-21 01:14:06 -05:00
Sadrul Habib Chowdhury
bd6946ebc3 Allow searching in input history.
You enter some text in the input, then press ctrl+r to cycle through
the history that has the entered text as a substring.
2010-02-19 13:24:00 -05:00
Sadrul Habib Chowdhury
23b17abd7a Exclude the PID when expanding $STY.
Excluding the PID from the expansion of $STY makes it possible to
do, e.g. 'source screenrc-$STY' to load session-specific commands.
If the PID is desired, for some reason, then '$PID.$STY' should be
used instead.
2010-02-18 15:20:36 -05:00
Sadrul Habib Chowdhury
b7d33bdc3c Fix creating numbered windows.
This is another bug introduced when the max number of windows was
made configurable. Bug reported by Christian Ebert in
<20100218160955.GC21624@krille.blacktrash.org>.

And fix a typo.
2010-02-18 14:30:41 -05:00
Sadrul Habib Chowdhury
75441d0e47 Update comment regarding msg-version history. 2010-02-18 10:29:36 -05:00
Sadrul Habib Chowdhury
8b46d8a5d2 Bump msg revision number so proper checking can be done. 2010-02-18 10:23:07 -05:00
Sadrul Habib Chowdhury
058bb9e0df Changelog the last few changes. 2010-02-17 01:30:00 -05:00
Sadrul Habib Chowdhury
e01e137673 Allow expanding the command to full buffer size.
Without this, commands like '-Q echo $STY' would fail with error:
  no space left for variable expansion.
2010-02-16 16:29:34 -05:00
Curtis Brown
45ddce39d1 Spelling fixes.
Closes #28473 on savannah.
2010-02-16 14:39:57 -05:00
Curtis Brown
7dc1b16ca3 Update info-page for 'stuff'.
Closes #28616 on savannah.
2010-02-16 14:36:04 -05:00
Curtis Brown
978f859e50 Document 'layout dump', and clarify 'layout save'.
Closes #28586 on savannah.
2010-02-16 14:33:06 -05:00