Comments (1)
Wow, that is a very bad example. The following patch fixes it (will create a PR soon):
diff --git a/src/textobject.c b/src/textobject.c
index 1890d7c83..aa2db0770 100644
--- a/src/textobject.c
+++ b/src/textobject.c
@@ -1426,15 +1426,22 @@ again:
if (!do_include)
{
- // Exclude the start tag.
+ // Exclude the start tag,
+ // but skip over '>' if it appears in quotes
+ int in_quotes = FALSE;
curwin->w_cursor = start_pos;
while (inc_cursor() >= 0)
- if (*ml_get_cursor() == '>')
+ {
+ p = ml_get_cursor();
+ if (*p == '>' && !in_quotes)
{
inc_cursor();
start_pos = curwin->w_cursor;
break;
}
+ else if (*p == '"' || *p == '\'')
+ in_quotes = !in_quotes;
+ }
curwin->w_cursor = end_pos;
// If we are in Visual mode and now have the same text as before set
from vim.
Related Issues (20)
- mousemodel=popup not working properly with many items on PopUp menu
- manpager.vim emits a "Changing a readonly file" error/warning
- foldexpr '<1' results in a level-3 fold HOT 2
- Clarification on expected behavior of <S-CR>
- A correction to the docs
- Clipboard and primary selection registers not working despite +clipboard HOT 7
- incsearch option to highlight matches without moving the cursor HOT 4
- xxd color output is inefficient
- vimscript wrong indentation
- Sudo vi/vim read-only files can be edited and forcibly saved! How to disable forced savings. HOT 4
- [vim9class] incorrect `string()` of funcref of object's function
- "Whole words" mode for fuzzy-searching for more than one word HOT 1
- [vim9script] unexpected behavior accessing `export const` variable from same file HOT 2
- Make listchars extends/precedes, fillchars lastline, and "<<<" consistent HOT 6
- I want to insert some titles when I create a new .v file, so I created a new function, and I want to set some autocmd commands to achieve this function, but the same au command works fine when written in ~/.vimr, but does not work in ~/.vim/pack/xxx/start/xxx/ftplugin/verilog.vim. Why is that?
- [vim9script] imports sourced in wrong order HOT 4
- .css file extensions add extra asterisks (*) when not supposed to HOT 1
- `g:markdown_md` variable has no effect HOT 2
- syn-iskeyword should not be global HOT 1
- <C-b> does not overlap two lines when starting from all the way at the bottom of the buffer
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 vim.