[TextEditor-mcc] Re: How can take not marked blocks (useful for sintax highlight)

  • From: Jens Langner <Jens.Langner@xxxxxxxxxxxxxx>
  • To: texteditor_mcc@xxxxxxxxxxxxx
  • Date: Wed, 04 Mar 2009 10:09:15 +0100

Hi Gianfranco,

Gianfranco "ShInKurO" Gignina schrieb:

[...]
>> is there any way to insert some coordinates (for example startx,
>> starty, stopx, stopy) and retrieve than block of text without mark it?
>>
>> I would want implement sintax highlight on NoWinED, but without to
>> retrieve a block without to mark it the only way could be to get
>> content of texteditor, to read last word, and if should be coloured,
>> mark it on texteditor and coloured it... I find this few good...
>>
>> Suggestions?
> 
> Nevermind, I've just implemented it into TE sources:
> 
> basically I've addd some attributes to struct MUIP_TextEditor_ExportBlock
> which are considered only if flag is MUIF_TextEditor_ExportBlock_TakeBlock,
> so in this case you can take a block without to select it, only specifing
> coordinates.
> 
> I've even added MUIM_TextEditor_SetBlock, which is useful to change a block
> of text without to select it, always specifing coordinates. For now are
> supported changing of colour block and style of block...
> 
> Here diff file...

First of all, thanks for finally considering to implement the stuff
yourself :) This is exactly what open source is for. If you need
something and there is nobody maintaining the same area in the code yet,
it is always better to go and see if you can implement it yourself.

However, to correctly understand your changes I have to request that you
remove the load of unnecessary noise in your submitted diff file. That
means I can see a lot of unnecessary changes like:

-- cut here --
@@ -193,7 +193,7 @@
   struct line_node *next;     // Pointer to next line
   struct line_node *previous; // Pointer to previous line

-       struct LineNode line;
+  struct LineNode line;

   UWORD visual;               // How many lines are this line wrapped over
   UWORD flags;                // Different flags...
-- cut here --

here the diff was just produced because you changed the indentation. You
probably used TABs when coding. However, we do not accept any tabulator
spaces in the source code. So please cleanup your changes and resubmit
them here. This will help us all to better understand what exactly you
have done and to integrate them properly into the SVN respository.

> I want work to \t character, but even if I've a working and good version of
> a function to use instead of plain Text() in any case all cursor movements
> trash spaces drawn with this function, so I would want informations about
> how could change functions which draw cursor and refresh a line, I've jst
> tried to modify SetCursor() etc... but without any good result...

Sorry, don't get it. What exactly do you want to achieve?

cheers,
jens
-- 
Jens Langner, Dresden/Germany
http://www.jens-langner.de/
-- 
_____________________________________________________________________________
TextEditor ML   - //www.freelists.org/list/texteditor_mcc
Listserver help - mailto:texteditor_mcc-request@xxxxxxxxxxxxx?Subject=HELP
Bugtracker......: http://sourceforge.net/tracker/?atid=731469&group_id=135025


Other related posts: