Code Monkey home page Code Monkey logo

fastcoloredtextbox's People

Contributors

0xack13 avatar astorch avatar danny3313 avatar ericvf avatar gabcard avatar jmr1 avatar paveltorgashov avatar ryzhov52 avatar stefh avatar vikas0380 avatar warlock9k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fastcoloredtextbox's Issues

AutocompleteMenu vertical offset doesn't compute correctly

Function "private void DoSelectedVisible()":
In line "var y = FocussedItemIndex * itemHeight - VerticalScroll.Value;"
VerticalScroll.Value is not always actual.
I think you need add "some magic" before this line.
Like this:
" AutoScrollMinSize -= new Size(1, 0);
AutoScrollMinSize += new Size(1, 0);
var y = FocussedItemIndex * itemHeight - VerticalScroll.Value;"
I saw this problem with very big popup menu. Every odd times VerticalScroll.Value is zero as a result.
This line in function "internal void DoAutocomplete(bool forced)":
"VerticalScroll.Value = 0;" isn't really update this value but this value are using in "DoSelectedVisible".

See this video report http://www.youtube.com/watch?v=qyCLwvvy4Uw

Comment blocs coloring bug

Here's a sample code where coloring is wrong:
A comment block is "invented" between /*"Completion and EndsWith("*/".

(snip)

    catch (Exception ex) {
        ErrorManager.ShowError(/*"Completion error",*/ ex);
    }

(snip)

   if (!ASContext.CommonSettings.DisableCodeReformat && !txt.EndsWith("*/"))
        ReformatLine(Sci, Sci.PositionFromLine(line) - 1);

(snip)

StyleIndex and AddStyle/ClearStyle problem

Core problem: StyleIndex.None = 0. This is valid index in Styles array, but invalid flag to set/reset. Style0 = 1 but it is not the first index int the array.
So, the first call to
var styleIndex = fctb.AddStyle(style) returns 0th index. It's correct as array index, but not as StyleIndex and as style flag
Now the call to
fctbClearStyle(styleIndex) doesn't work, since it tries to reset with a mask with all 0s.

Suggestion:

  1. let AddStyle() returns StyleIndex, not int
  2. Inc array Index to be StyleIndex on AddStyle(); and Dec as soon you need get the real index

Improvement: Add clickable overview "heat map" for the diff gui

In the examples, a diff tool implementation is shown at http://www.codeproject.com/KB/edit/FastColoredTextBox_/diffMerge.png

it would be nice if the diff tool was extended with a small bar showing the heat map of changes in the files. Preferably, also allowing mouse clicks in the bar to jump the view to that location - similar to http://www.diffutils.com/wp-content/uploads/2006/10/araxis.jpg where a small bar is shown to the outermost left and right.

I guess this can be implemented completely outside of FastColeredTextBox, but it would be nice if it was standard a part of the package.

AutoComplete with AutoIndent

Hi, i have suggestion, the AutoIdent, if user starting writing a function, automatically show AutoComplete(Like as Visual Studio)... I created custom show, but is verry laggly. Thanx :)

Newly added DocumentMap does not handle correctly assigning null to Target property

Hello Pavel,

Great component with excellent features; I found a trivial bug with the Target property definition.
Here is my corrected version:

        [Description("Target FastColoredTextBox")]
        public FastColoredTextBox Target
        {
            get { return target; }
            set
            {
                if (target != null)
                    UnSubscribe(target);

                target = value;
                if (value != null)
                {
                    Subscribe(target);
                }
                OnTargetChanged();
            }
        }

Bug in AutoIndent

I have used a very big vbscript file to test if auto Indenting works well but no luck.
the issues is its keeps on moving at the right side and does not come back to the left side.

e.g.
Function fn1()
If something then
SomeCode
SomeCode
End If
End Function

     Function fn2()   
        ................
         ..............
              ................

another suggestion would be rather then using "space chr" for indenting can we have Tab char

Scrolling: by keyboard

First of all, Thanks for such a great job...
This is not an issue, but it is more like a feature request.
In VS you can scroll by holding CTRL and up-down arrows, it's good to sea the same feature in your control.

Undo command resets styles of Chars

UndoableCommands contain only symbols and don't contain StyleIndex. Also I have a same problem with Copy-Paste operation: it does not support StyleIndex too.
Is there any way to fix this situation?

Wide caret hides text

When I switch ON wide caret, letter under cursor become invisible - instead of proper caret I see just hardcoded white rectangle, changed to black one.

Pull requests

I noticed that you have not accepted the pull requests. I was thinking about contributing with some changes regarding code folding.

But before I begin I would like to know if you will accept pull requests?

Mono support

There are multiple calls to windows dll's, I have added some hacks around these dllimports in my fork, autocomplete and autoindent should mostly work if you incorperate my changes in FastColoredTextBox.cs.

However, there is an issue with autocomplete, the box will always have the size of a few pixels.
After debugging some i noticed that "Size" in CalcSize() will always be set to 4*26, there appears to happen some kind of bounding there.

I have spend quite a few hours trying to fix this, setting random size-related vars, nothing seems to influence the size except for setting autocomplete.Items.Minimumsize outside of the library, but that won't fix the issue.
Issue also happens in your example code.

http://i.imgur.com/hNvxxta.png
(upper: Mono, lower: .net)

Readonly not working when text is selected and backspace pressed

Hi Pavel, thank you for this control. I've found a bug probably. When setting the .ReadOnly property of the control, or setting up some readonly blocks, the text can be modified by selecting the portion of readonly text and pressing backspace. For other actions (delete, insertion, ...) it's working correctly. Is this a bug?

Hotkeys to be execute external codes

I would like to be able to assign a hotkey to a method of class of my choice. In this case I;d like to have the selected area passed to the called function.
for example, I am trying to use this control as a SQL scripting environment. I select a statement and hit ALT+X. the selected statement should be passed to method Execute in class SqlEngine.

Scrolling problem after setting SelectionStart manually

Hi Pavel, first of all thank you for sharing this component, it is amazing. Fast and full of interesting features.

Now, I would like to report a bug that I have found (or could be that I have done something wrong).

I am trying to scroll into view manually to a certain string inside a loaded text file, using the property SelectionStart.

It seems to work properly and the right part of text is shown, but if I click then on FastColoredTextBox component and scroll with the mouse wheel or even move with the keyboard arrows, it starts moving from the beginning of the file and not from the place I have set.

Do you have any idea if it is a bug and if there is a workaround?

Thank you in advance

Show invisible characters

First of all, thanks for this great component
But I've one other issue besides RTL support #67 , i need to display invisible characters like WhiteSpace, TAB, CR, LF, WordWrap.
This is a show-stopper for my application, Is that available ?

SetFoldingMarkers uses startFoldingPattern as FoldingEndMarker

I'm trying to implement a custom Style formatted language. I have set some folding markers, when i noticed the folded range went to the end of the TextBox Text. I've looked up the "range" class and noticed that in void SetFoldingMarkers, the finishFoldingPattern is set as FoldingEndMarker, so the folding doesn't seem to work as intended.

Cannot change font

As the title says, I cannot change the font used for rendering, neither from the properties window, nor programmatically. It's always Courier New.

Apart from that, it works beautifully. Thank you.

Sync Scrooling

Hi,

Is there a way to make 2 FCTB sync between each other pls ? I mean sync on the base of the lines..

Comments Highlighting

Hi Pavel,
I found issues with comments coloring, i have checked the same with VB as well as with C#
it starts with green but as soon as it finds double equated string it colored it red within comments as well
comments

Breakpoints

I am wondering if it would be possible to add native support for breakpoints similar to those in Visual Studio. I saw that you did something like this in your MarkerToolSample, but I would much prefer something that can be customized from the designer and has a method of retrieving a collection of line numbers on which breakpoints have been placed. As I am currently writing a debugger for an IDE I am working on, this would be an extremely helpful feature to me. Is this an idea you would be willing to consider implementing?

Help file has index, no articles

The current help file has good table of contents and index but there does not seem to be any actual information articles (i.e. no pages when you click on the title). Is the file broken?

Higher DPI support is a bit poor?

Hi,

Firstly thanks for your nice work!
I have a Retina Macbook Pro, and I just tried your library, but the words inside the textbox seemed a bit blurry because the library does not support retina MBP's HiDPI screen, and then I tried to add dpiAware to app.manifest in both my app and your library, but it still blurry. So, what should I do to solve this problem?

Regards,
Jackson Ming Hu

XML and HTML SyntaxHighlighting : attribute=value as value from xml element are incorrectly colored

This XML code:

<!-- Attributes are highlighted correctly -->
<childNode attr=a>value</childNodes>
<childNode attr='a'>value</childNodes>
<childNode attr="a">value</childNodes>

<!-- The values are incorrectly highlighted as attribute=value -->
<childNode>attr=a</childNodes>
<childNode>attr='a'</childNodes>
<childNode>attr="a"</childNodes>

Is highlighted as:
2014-08-06_15h34_14

I tried to solve this by using a lookahead, but it's not yet working. Do you maybe have some suggestion?

Nuget

Any way to get this onto nuget?

FastColoredTextBoxNS.Navigate bug

Current Navigate code:
if (iLine >= LinesCount) return;
lastNavigatedDateTime = lines[iLine].LastVisit;
Selection.Start = new Place(0, iLine);
DoSelectionVisible();
Why LastVisit don't update? NavigateBackward don't work after calling Navigate.
I inserted
lastNavigatedDateTime = lines[iLine].LastVisit;
before assignment lastNavigatedDateTime = lines[iLine].LastVisit
And bug was fixed.

support language that starts from right to left Like (Arabia)

Hello,

thank you for the wonderful tool, but I have some notes

When I try to write some comments on the codes I use my native language and that starts from right to left (Arabia) and which unfortunately the editor does not support it is presenting as letters intermittent and already reflected as in the pictures attached, so I hope that there is support for languages that start from right to left.

When I copy the Arabic text that appears in reverse from your editor and I do pasted into Notepad program it appears correctly.

This Arabic text you can try (بسم الله الرحمن الرحيم)

untitled

Fast Colored TextBox license‏

Hello Pavel,
i noticed that your software is licensed under: GNU Lesser General Public License (LGPLv3).
As far as i got it from the net, a software licensed with LGPL can be included in a proprietary software.
However i couldn't find explicit note about v3 of LGPL. Thus i'd like to ask about your intention and opinion. Do you reveal the source code of Fast Colored TextBox for use in proprietary software?
Thanks in advance :) ,
Kamen

HTML Export Newline when not using <br>

HTML export is not adding '\n' characters when not using 'br' tag.

In ExportToHTML.cs: bool property "UseBR" (line 31-34) documentation states:
/// Use 'br' tag instead of '\n'

In ExportToHTML.cs: inside GetHtml function (line 92) the statement which accesses this bool is:
tempSB.Append(UseBr ? "<br>" : "");

It seems like the intended behavior of line 92 should be:
tempSB.Append(UseBr ? "<br>" : "\n");

Making this change makes my text export correctly, whereas without it there are no new lines present in the HTML file.

Location issue on selection

I have developed a XML validation application and for viewing I have used your control. So currently I'm having issue with locating correct position of the xml. So is there any way to handle hidden characters?

Thanks in advance.

NewLine/Tab Problem

I am working on custom REGEX highlighter and I was wondering if it is possible to use "\n" instead of "\r\n" for new line character (when user hits ENTER in fct) and "\t" instead of 4 spaces (when user hits TAB in fct)?

I tried replacing newline with \n, but I get an empty line and the text jumps into 1 line.

Thanks for the answer.

Limitation in autoindenting

I am making an "IDE" for a functional language very similar to haskell (you can consider it a subset).
Your textbox rocks, however it has some limitations when needing to do more precise autoindenting than remove/insert a new tab, namely indenting to an exact location.

My issue: after a user has entered ", if ..." and goes to a new line, it should indent to the exact x-location as the previous line's first encounter of the char '=', indentation plays a key role in the language btw.

(silly) Example:
isTrue = "I always get returned", if True
...........= "I'm of no use whatsoever :(", if False
...........^indent to here

Suggestion:

  1. Add a get-able "CurrentIndentation" to AutoIndentEventArgs e, so the negative indents can be calculated in the event by ourselves.
  2. Add an option to set indent as an absolute position.

PS:
This is my first issue =)

File still in use after close

Hi Pavel,

fantastic job on this control, I love it.

I'm having one issue though where I close a file and it doesn't get properly released - i.e. the next time I try and open it in my app it says the file is in use - but if I close the app and reopen the file has been released.

What is the proper way to close an open file please?

I open it as a FileTextSource and try and close like this:

        if (lines is FileTextSource)
        {
            var ftsa = lines as FileTextSource;
            CloseFTS(ftsa);
        }

But by that stage lines is a TextSource.

Why there is no syntax highlighting for C/C++?

Many versions have been updated, and there is still no highlight for C/C++. I really need this.
Developers can specifically for the development of syntax highlighting module. Can later do more expansion. I believe that there will be a great future.

Grouping in the View XML

In the view of the grouping of XML files, we do not take into account the namespace.
It appears no grouping.
Example:
sh:StandardBusinessDocumentHeader
sh:HeaderVersion1.0/sh:HeaderVersion
sh:Sender
<sh:Identifier Authority="EAN.UCC">4002174000011/sh:Identifier
/sh:Sender
sh:Receiver
<sh:Identifier Authority="EAN.UCC">4049111100014/sh:Identifier
/sh:Receiver
sh:DocumentIdentification
sh:StandardEAN.UCC/sh:Standard
sh:TypeVersion2.8/sh:TypeVersion
sh:InstanceIdentifierBC77F9BF-35D8-47A0-8A62-2D1980DA16FA/sh:InstanceIdentifier
sh:TypecatalogueItemNotification/sh:Type
sh:MultipleTypefalse/sh:MultipleType
sh:CreationDateAndTime2001-12-17T10:30:47/sh:CreationDateAndTime
/sh:DocumentIdentification
/sh:StandardBusinessDocumentHeader

Can I share my modification to handle the real tab indent \t

FastColoredTextBox always uses the space instead of tab characters as default. I'm not sure the reason is you dont want to or anything else... So can I share my modification of FastColoredTextBox to handle the real tab indent \t here? Just hope it's useful for someone else.

Styles cannot be found

Hi
I use your textbox for a console software, with which I can color some parts of the text.
Unfortunatly I have a little problem. I add a text with a Fore- and Backgroundcolor. This works fine so far. Then I add another text with another Fore- and Backgroundcolor. And so on. Sometimes it happens that when I add a text with a style which I already used before is not found with the function
public int GetStyleIndex(Style style) (returns -1, although when I look for myself through the array I can find the style), which causes that it is added again. Because of that I reach the maximum of 32 styles very fast. (Fontstyle stays always the same)

I add text with the following function:

MyBase.AppendText(text)
MyBase.SelectionStart = MyBase.Text.Length - Len(text)
MyBase.SelectionLength = Len(text)
MyBase.Selection.SetStyle(Me.activeTextStyle)

I generate the style with the following code:

activeTextStyle = New TextStyle(New SolidBrush(ForeGroundCol), New SolidBrush(BackGroundCol), FontStyle.Regular)

Is it because I generate the Style always new (with the code above)? Is there a possibility to find an already added style via it's foregroundcolor, backgroundcolor and textstyle?

Kind regards
Lukas Leuenberger

Search reaching end of document bug

When searching for a string in a document that is found multiple times, the editor tels "not found" when end is reached. The next search starts over from the beginning, but sometimes a second "not found" is shown. This is easily reproduced searching in a 10-20 lines document for a string existing 3 times.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.