Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 290433 Details for
Bug 354471
app-misc/mc: paste from mcview or mcedit adds (nonexisting) spaces to the tail of lines
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
konsole-4.7.2-delete-useless-chars.patch
konsole-4.7.2-delete-useless-chars.patch (text/plain), 3.15 KB, created by
Lars Wendler (Polynomial-C) (RETIRED)
on 2011-10-21 08:35:28 UTC
(
hide
)
Description:
konsole-4.7.2-delete-useless-chars.patch
Filename:
MIME Type:
Creator:
Lars Wendler (Polynomial-C) (RETIRED)
Created:
2011-10-21 08:35:28 UTC
Size:
3.15 KB
patch
obsolete
>--- konsole-4.7.2/src/Character.h >+++ konsole-4.7.2/src/Character.h >@@ -67,8 +67,9 @@ > inline Character(quint16 _c = ' ', > CharacterColor _f = CharacterColor(COLOR_SPACE_DEFAULT,DEFAULT_FORE_COLOR), > CharacterColor _b = CharacterColor(COLOR_SPACE_DEFAULT,DEFAULT_BACK_COLOR), >- quint8 _r = DEFAULT_RENDITION) >- : character(_c), rendition(_r), foregroundColor(_f), backgroundColor(_b) {} >+ quint8 _r = DEFAULT_RENDITION, >+ bool _real = true) >+ : character(_c), rendition(_r), foregroundColor(_f), backgroundColor(_b), isRealCharacter(_real) {} > > union > { >@@ -92,6 +93,17 @@ > /** The color used to draw this character's background. */ > CharacterColor backgroundColor; > >+ /** Indicate whether this character really exists, or exists simply as place holder. >+ * >+ * TODO: this boolean filed can be further improved to become a enum filed, which >+ * indicates different roles: >+ * >+ * RealCharacter: a character which really exists >+ * PlaceHolderCharacter: a character which exists as place holder >+ * TabStopCharacter: a special place holder for HT('\t') >+ */ >+ bool isRealCharacter; >+ > /** > * Returns true if this character has a transparent background when > * it is drawn with the specified @p palette. >--- konsole-4.7.2/src/Screen.cpp >+++ konsole-4.7.2/src/Screen.cpp >@@ -65,7 +65,8 @@ > Character Screen::defaultChar = Character(' ', > CharacterColor(COLOR_SPACE_DEFAULT,DEFAULT_FORE_COLOR), > CharacterColor(COLOR_SPACE_DEFAULT,DEFAULT_BACK_COLOR), >- DEFAULT_RENDITION); >+ DEFAULT_RENDITION, >+ false); > > //#define REVERSE_WRAPPED_LINES // for wrapped line debug > >@@ -663,6 +664,7 @@ > currentChar.foregroundColor = effectiveForeground; > currentChar.backgroundColor = effectiveBackground; > currentChar.rendition = effectiveRendition; >+ currentChar.isRealCharacter = true; > > int i = 0; > int newCursorX = cuX + w--; >@@ -678,6 +680,7 @@ > ch.foregroundColor = effectiveForeground; > ch.backgroundColor = effectiveBackground; > ch.rendition = effectiveRendition; >+ ch.isRealCharacter = false; > > w--; > } >@@ -813,7 +816,7 @@ > int topLine = loca/columns; > int bottomLine = loce/columns; > >- Character clearCh(c,currentForeground,currentBackground,DEFAULT_RENDITION); >+ Character clearCh(c,currentForeground,currentBackground,DEFAULT_RENDITION,false); > > //if the character being used to clear the area is the same as the > //default character, the affected lines can simply be shrunk. >--- konsole-4.7.2/src/TerminalCharacterDecoder.cpp >+++ konsole-4.7.2/src/TerminalCharacterDecoder.cpp >@@ -102,8 +102,15 @@ > > for (int i=0;i<outputCount;) > { >- plainText.append( QChar(characters[i].character) ); >- i += qMax(1,konsole_wcwidth(characters[i].character)); >+ if ( characters[i].isRealCharacter ) >+ { >+ plainText.append( QChar(characters[i].character) ); >+ i += qMax(1,konsole_wcwidth(characters[i].character)); >+ } >+ else >+ { >+ ++i; // or, shoulw we 'break' directly here? >+ } > } > *_output << plainText; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 354471
: 290433