From mboxrd@z Thu Jan 1 00:00:00 1970 From: stettberger@dokucode.de (Christian Dietrich) Date: Fri, 02 Oct 2009 22:48:24 +0200 Subject: [sup-talk] Feature Request: Collecting Lines in Index Mode In-Reply-To: <1254334371-sup-5145@masanjin.net> References: <1254247706-sup-2745@peer.zerties.org> <1254334371-sup-5145@masanjin.net> Message-ID: <1254516195-sup-4619@peer.zerties.org> Excerpts from William Morgan's message of Mi Sep 30 20:17:55 +0200 2009: > Cool idea. I'd like to see how this looks. > > > I tried to implement the feature by my self, but the mapping beetween > > `curpos' and `@threads' in modes/thread-index-mode.rb made this a > > little bit hard, and i didn't know how to solve this problem without > > breaking sup. Perhaps you can give me a hint, how this problem with > > the direct mapping can be solved. > > If you look at #regen_text, @text and @lines are the two variables that > control the display. @text is an array of the GUI elements for each line > of the display. Right now it's just set to one line for each thread. You > want to add one additional element at the appropriate position. for each > date line. GUI elements are represented as arrays of [color, text] > pairs; you can look at #text_for_thread_at for an example. > > Then, you want to make sure that @lines is set correctly. @lines is a > map (hash) from line number to thread (so that when the user presses a > key, we know which thread the cursor is resting on). Thank you, that helped a much. I implemented the feature, it is available at git://github.com/stettberger/sup-mail.git branch time_marks, it is one commit ahead of next. It is enabled with setting the config option ":time_markers_in_index_mode: true" At runtime it can be toggled via '%' (just randomly choosen by me) greetz didi -- No documentation is better than bad documentation -- Das Ausdrucken dieser Mail wird urheberrechtlich verfolgt.