Vincent van Ravesteijn - TNW schrieb:

Here it is. It allows :
-    inserting tabs,
-    removing tabs and spacing by backtab,
-    copying code with tabs from other applications.

Pasting C++ Code to a listings inset doesn't work:

Try to copy this code

        ~Impl()
        {
                if (wa_) {
                        wa_->closeAll();
                        delete wa_;
                }
                delete inset;
        }

The result is that LyX ignores all line breaks.

src/frontends/qt4/GuiFontMetrics.cpp :
The line "metrics_.width(ucs4_to_qchar(c))" wasn't working properly for tabs (returned the size of a single space instead of 8). That's why {&& c != '\t'} is necessary in the following: if (is_utf16(c) && c != '\t')
      value = metrics_.width(ucs4_to_qchar(c));
   else
      value = metrics_.width(toqstr(docstring(1, c)));

Looks sensible. The size of a TAB is the width of 8 typewriter characters. This is to much and makes code unreadable, I propose a width of 4 characters.

src/frontends/qt4/Buffer.cpp :

   allowing to paste text with tabs. This is now also allowed for ERTs ? Is this
   a problem

TABs should also be allowed in ERTs. But this doesn't work currently. But support for this can be added later.

src/Lexer.cpp :

   Tabs were neglected when reading in the LyX file.

Is correct.

thanks and regards
Uwe

Reply via email to