Comments (2)
Thanks for posting the issue. You can fix the colors by triggering a refresh of the syntax highlight buffer, i.e. make Notepad++ re-evaluate the syntax colors for the entire file. Like you point out, this can be done by closing/opening the file, but you can also switch between different tabs to another file and back, or select Language > None (normal text)
and then back to Language > CSVLint
.
This is indeed a bug and it is caused by when you edit halfway in the file then the lexer (which determines the syntax highlighting) only re-evaluates the colors starting from the position where you edited the text. In this case the variables are not initialised correctly because it always starts with color 1 instead of color 3 in this case.
The code for syntax highlighting the multiline text values with quotes is already tricky, but I'll see if I can fix it.
from csvlint.
I've updated the lexer which only slightly improves it, meaning in some cases it will handle a two-line quote string correctly now, but in most cases it will still result in incorrect syntax highlighting when you edit a quoted-multiline-string on the second/third/fourth/etc line.
The problem is that when the user edits the text, the lexer will be triggered with the start position of the edit part as a parameter. When the opening quote "
character is located one or more lines before that edit point, then the lexer assumes it is just a new line, so a new record, and it will initialise with the first color index. There's no way to tell if the user was editing in the middle of a quoted string, and always checking backwards to find an opening-quote would in most cases go all the way back to the start of a file which could lead to performance issues.
You can download the beta DLL here which contains this "update". Not sure how to properly fix this in all cases, I'll return to this at a later time.
from csvlint.
Related Issues (20)
- When Transparant cursor true, Notepad++ crash at startup in certain circumstances HOT 1
- Conversion to JSON is extremely slow HOT 3
- Plugin management of NPP shows old version HOT 3
- Validate data : not a valid integer value HOT 2
- Bug when used with another plugin (CSVLint and ComparePlus) HOT 2
- Lock first row when scrolling HOT 4
- multi-byte separator characters get split into their byte-components (unicode, UTF-8) HOT 1
- Transparent cursor line turns completely black when changing style in NPP 8.6 HOT 13
- Respect escaped commas HOT 6
- Missing Characters after Reformat HOT 1
- 我觉得你这个颜色按钮位置有问题. 我找了一天都不知道在哪里 HOT 11
- csv repair and troubleshooting HOT 2
- Opening a dialog from the CSV Lint window causes NPP to hang if the window is undocked HOT 6
- Transparent cursor breaks custom colors HOT 1
- Ctrl+C and Ctrl+X no longer work in forms for Notepad++ 8.6.1 and newer. HOT 3
- ..is not a valid enumeration member, detecting enumeration should ignore certain cases HOT 2
- CSVLint plug-in crashing when opening an SQL file (should not automatically parse non-CSV files) HOT 8
- Reformat, Sort and Add Column changes CRLF to LF HOT 2
- Not getting highlighting HOT 1
- CSVLint causes Notepad++ crash when attempting to open file with more than 2**31 - 1 bytes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csvlint.