projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add -format to pick
[mmh]
/
sbr
/
seq_msgstats.c
diff --git
a/sbr/seq_msgstats.c
b/sbr/seq_msgstats.c
index
6b89d70
..
7ffbde1
100644
(file)
--- a/
sbr/seq_msgstats.c
+++ b/
sbr/seq_msgstats.c
@@
-98,6
+98,11
@@
void
set_selected(struct msgs *mp, int msgnum)
{
assert_msg_range(mp, msgnum);
set_selected(struct msgs *mp, int msgnum)
{
assert_msg_range(mp, msgnum);
+
+ if (is_selected(mp, msgnum)) {
+ return;
+ }
+
mp->msgstats[msgnum - mp->lowoff] |= SELECTED;
if (mp->lowsel == 0 || msgnum < mp->lowsel) {
mp->lowsel = msgnum;
mp->msgstats[msgnum - mp->lowoff] |= SELECTED;
if (mp->lowsel == 0 || msgnum < mp->lowsel) {
mp->lowsel = msgnum;
@@
-126,19
+131,17
@@
void
unset_selected(struct msgs *mp, int msgnum)
{
assert_msg_range(mp, msgnum);
unset_selected(struct msgs *mp, int msgnum)
{
assert_msg_range(mp, msgnum);
+
+ if (!is_selected(mp, msgnum)) {
+ return;
+ }
+
mp->msgstats[msgnum - mp->lowoff] &= ~SELECTED;
if (mp->numsel > 0) {
mp->numsel--;
}
}
mp->msgstats[msgnum - mp->lowoff] &= ~SELECTED;
if (mp->numsel > 0) {
mp->numsel--;
}
}
-void
-unset_unseen(struct msgs *mp, int msgnum)
-{
- assert_msg_range(mp, msgnum);
- mp->msgstats[msgnum - mp->lowoff] &= ~SELECT_UNSEEN;
-}
-
/*
** private/public sequences
/*
** private/public sequences