From 863fab113b71a34ba5e88f9d0096d727c240da4b Mon Sep 17 00:00:00 2001 From: Edouard Dupin Date: Tue, 11 Oct 2011 14:04:55 +0200 Subject: [PATCH] add patch correction done in branch display line by line stop the developpement of the display line by line because it did not work corectly and was a little cpu leacher, the display has maany error and the comphehention is hard. --- Sources/Buffer/BufferText.cpp | 36 ++++++++++++++++++++++++++++--- Sources/tools/charset/charset.cpp | 4 ++++ data/lang_asm.xml | 2 +- data/lang_matlab.xml | 2 +- 4 files changed, 39 insertions(+), 5 deletions(-) diff --git a/Sources/Buffer/BufferText.cpp b/Sources/Buffer/BufferText.cpp index c7f862f..8c73f0e 100644 --- a/Sources/Buffer/BufferText.cpp +++ b/Sources/Buffer/BufferText.cpp @@ -37,6 +37,10 @@ const uint32_t nbLineAllocatedInBase = 300; +extern "C" +{ + const char * g_pointerForTheDisplayLine[] = {"%1d", "%2d","%3d","%4d","%5d","%6d","%7d","%8d","%9d","%d"}; +} @@ -236,7 +240,33 @@ void BufferText::DrawLineNumber(DrawerManager &drawer,char *myPrint, int32_t li drawer.Text(myColorManager->Get(COLOR_CODE_LINE_NUMBER), 1, positionY, tmpLineNumber); } - +/** + * @brief Update internal data of the pointer to display + * + * @param[in,out] --- + * + * @return --- + * + */ +/* +void BufferText::UpdatePointerNumber(void) +{ + // get the number of line in the buffer + int32_t maxNumberLine = m_EdnBuf.NumberOfLines(); + //int32_t maxNumberLine = 2096; + if (10 > maxNumberLine) { m_nbColoneForLineNumber = 1; + } else if (100 > maxNumberLine) { m_nbColoneForLineNumber = 2; + } else if (1000 > maxNumberLine) { m_nbColoneForLineNumber = 3; + } else if (10000 > maxNumberLine) { m_nbColoneForLineNumber = 4; + } else if (100000 > maxNumberLine) { m_nbColoneForLineNumber = 5; + } else if (1000000 > maxNumberLine) { m_nbColoneForLineNumber = 6; + } else if (1000000 > maxNumberLine) { m_nbColoneForLineNumber = 7; + } else if (10000000 > maxNumberLine) { m_nbColoneForLineNumber = 8; + } else if (100000000 > maxNumberLine) { m_nbColoneForLineNumber = 9; + } else { m_nbColoneForLineNumber = 10; + } +} +*/ /** * @brief Display the curent buffer with all the probematic imposed by the xharset and the user contraint. * @@ -842,7 +872,7 @@ void BufferText::cursorMove(int32_t gtkKey) case GDK_Page_Up: # endif //EDN_INFO("keyEvent : "); - TextDMoveUp(m_displaySize.x); + TextDMoveUp(m_displaySize.y); break; # ifdef USE_GTK_VERSION_3_0 case GDK_KEY_Page_Down: @@ -850,7 +880,7 @@ void BufferText::cursorMove(int32_t gtkKey) case GDK_Page_Down: # endif //EDN_INFO("keyEvent : "); - TextDMoveDown(m_displaySize.x); + TextDMoveDown(m_displaySize.y); break; # ifdef USE_GTK_VERSION_3_0 case GDK_KEY_Begin: diff --git a/Sources/tools/charset/charset.cpp b/Sources/tools/charset/charset.cpp index b63f110..d2dda37 100644 --- a/Sources/tools/charset/charset.cpp +++ b/Sources/tools/charset/charset.cpp @@ -1139,7 +1139,11 @@ void ConvertInput(GdkEventKey *event, char* Utf8Out, bool &controlKey, bool &mov # endif key = '?'; break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Caps_Lock: +# elif USE_GTK_VERSION_2_0 case GDK_Caps_Lock: +# endif controlKey = true; break; default: diff --git a/data/lang_asm.xml b/data/lang_asm.xml index 4a231e4..0037cee 100644 --- a/data/lang_asm.xml +++ b/data/lang_asm.xml @@ -39,7 +39,7 @@ comment - // + (//|@) \n \ diff --git a/data/lang_matlab.xml b/data/lang_matlab.xml index 587370b..a507eca 100644 --- a/data/lang_matlab.xml +++ b/data/lang_matlab.xml @@ -28,7 +28,7 @@ preprocesseur - global + global( |\t)+ \n \