summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Tab.cc22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/Tab.cc b/src/Tab.cc
index 24865c4..32437b2 100644
--- a/src/Tab.cc
+++ b/src/Tab.cc
@@ -769,10 +769,26 @@ void Tab::motionNotifyEvent(XMotionEvent *me) {
769// of currentchain. 769// of currentchain.
770//----------------------------------- 770//-----------------------------------
771Tab *Tab::getFirst(Tab *current) { 771Tab *Tab::getFirst(Tab *current) {
772 if (current==0) 772 if (!current)
773 return 0; 773 return 0;
774 for (; current->m_prev != 0; current = current->m_prev); 774
775 return current; 775 Tab *i=current;
776
777 for (; i->m_prev != 0; i = i->m_prev);
778 return i;
779}
780
781//-------------- getFirst() ---------
782// Returns the first Tab in the chain
783// of currentchain.
784//-----------------------------------
785Tab *Tab::getLast(Tab *current) {
786 if (!current)
787 return 0;
788 Tab *i=current;
789
790 for (; i->m_next != 0; i = i->m_next);
791 return i;
776} 792}
777 793
778//-------------- insert ------------ 794//-------------- insert ------------