Comments (9)
I fixed the duplication issue, how do you suppose I detect a copy and paste from a user input?
from luaide.
well I'm not too sure because I haven't read your code thoroughly but I'm assuming when you have user input you pass it to a function that deals with duplicating the appropriate symbols? If so then just have the paste bypass that and just do a straight concat?
from luaide.
Yeah, but how do I detect a paste? :P How do I tell the difference between the user typing something, and CC typing something as a paste?
EDIT: hang on, were you talking about pasting lines, or when control+v is pressed?
from luaide.
You can detect pasting with ctrl+v or when the char event gets multiple chars inside the string
from luaide.
o.O so that's why the edit program does x = x+char:len() instead of x = x+1...
But if that's the case, then this shouldn't cause problems (I think). I'll look into it.
from luaide.
I've had a look and I can't see it... where do you actually handle the paste?
from luaide.
BIT: I don't handle pastes. CC just converts every letter of the paste into a char event.
superaxander: a paste isn't treated as a single char event. I just tested it. http://i.imgur.com/aXsOwpF.png
So basically there's no way for me to differentiate between the user pressing a key and CC pasting something in, so I can't actually do this BIT :( (that is, the part about stopping pasting from triggering the double "") Also, this won't happen when using the built in paste line function.
from luaide.
Ok. But I still recommend using the length cause I know many auto-typers that use multiples letters in one char event and it makes it easier for my os to copy paste into your program
from luaide.
Added that and fixed the first part of BIT's post.
from luaide.
Related Issues (20)
- Pressing enter before a function creates an end
- && crash in if statement HOT 1
- unable to run from a program? HOT 5
- cannot execute code with the "Run" menu HOT 2
- Bug when updated to latest version HOT 4
- VIM Command support HOT 1
- Clicking returns different coordinate when ran in a windows below 1 Y level HOT 1
- Page Up/Down Not Working
- Reopen last edited files menu HOT 2
- "Export" feature HOT 1
- Crash when changing themes HOT 2
- 2.0 Update breaks app HOT 6
- API/OS Specific Text Highlighting HOT 2
- Nil value on line 275 when attempting to download theme HOT 1
- Cannot change theme
- Recommend a "kid-friendly" branch
- Crash when terminated with ^T
- LuaIDE Crashes when I try to download theme luaide:256: attempt to index ? (a nil value) HOT 2
- Crashes without doing anything
- does not work in 1.16.5
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 luaide.