Comments (4)
from textadept.
I thought as much, for some reason, when the caret is within the block comments it reports buffer.current_pos
as nil.
I'm using a Linux machine, will check later on my Mac
from textadept.
The current position is the distance in bytes of the caret position from the beginning of the currently viewed document starting with one. So no matter where in the code, the current position is 1 if the Caret is at the very beginning of the buffer or larger, but never nil
.
Try to put following line at the beginning of the file (into the first line):
㑖㑖㑖㑖㑖
and then test which position is reported if you put the caret at the line end (press Ctrl+e and type 'buffer.current_pos` plus Enter. There are five characters behind the caret/cursor but the reported position will be 16 ( 1 + 5*3 bytes for the utf-8 code of the Unicode point of the character).
By the way: you can close the issue clicking on the appropriate button at the bottom of this page as the information provided up to now seem to have solved the problem you were facing.
from textadept.
Thanks @ClaudioGi and @orbitalquark
from textadept.
Related Issues (20)
- Curses version on mlterm seems to have a problem with soft wrapping HOT 4
- Textadept-curses cannot be launched from another process (zk) HOT 9
- Textadept will autoclose " ' ", making it very difficult to write english contractions like "don't" HOT 5
- Configuring markdown and python language servers produces 'failed to execute language server' HOT 1
- Textadept curses on mlterm produces straneous characters HOT 1
- Order of single commands outputs in a shell script is screwed in the output buffer HOT 6
- MacOS: Can't change preferences HOT 1
- Just updated from old (2019) version, howto question about API changes HOT 1
- Undo deletion & caret position HOT 2
- `events.connect(events.LEXER_LOADED,...)` strange behaviour in nightly HOT 2
- Cannot load built-in modules on macOS HOT 2
- how to make current line number have a different color? HOT 5
- ui.print_silent_to() doesn't update the Tab label HOT 1
- lua interpeter scope not working properly HOT 7
- Going for new style snippets, I can't makethem work as per documentation HOT 2
- Problem expanding snippet with $0 HOT 4
- HTML doc files missing from source archive HOT 5
- Feature Request: Help in curses mode should show md files HOT 4
- Textadept Windows support history HOT 1
- lfs.walk() hangs when passed a non-existent directory path. HOT 1
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 textadept.