Closed ghost closed 2 years ago
The above should address the issue you are seeing. Not all patch combinations are compatible unfortunately. I have better cross patch support in my personal build of dmenu which helps making improvements to this flexipatch build in situations like this.
I designed the following experiment: Created 3 directories with dmenu-flexipatch:
$ git clone https://github.com/bakkeby/dmenu-flexipatch
)$ git clone https://github.com/bakkeby/dmenu-flexipatch dmenu-flexipatch-index
)$ git clone https://github.com/bakkeby/dmenu-flexipatch dmenu-flexipatch-index-conflict
)dmenu-flexipatch doesn't have enabled patches. It is compiled right after cloning the repo. I just typed
$ make
dmenu-flexipatch-index only has printindex patch enabled:
define PRINTINDEX_PATCH 1
dmenu-flexipatch-index-conflict has printindex and multiselection patches enabled:
define MULTI_SELECTION_PATCH 1
define PRINTINDEX_PATCH 1
Then after compiling everything I run the following commands:
For dmenu-flexipatch:
$ echo -e "Hello\nWorld\nfoo" | ./dmenu-flexipatch/dmenu
Press Enter OUTPUT: Hello dmenu-flexipatch works as expectedFor dmenu-flexipatch-index:
$ echo -e "Hello\nWorld\nfoo" | ./dmenu-flexipatch-index/dmenu
Press Enter OUTPUT: Hello dmenu-flexipatch-index works as expected with no option$ echo -e "Hello\nWorld\nfoo" | ./dmenu-flexipatch-index/dmenu -ix
Press Enter OUTPUT: 0 dmenu-flexipatch-index works as expected with ix optionFor dmenu-flexipatch-index-conflict:
$ echo -e "Hello\nWorld\nfoo" | ./dmenu-flexipatch-index-conflict/dmenu
Press Enter OUTPUT: 0 dmenu-flexipatch-index-conflict is not working as expected$ echo -e "Hello\nWorld\nfoo" | ./dmenu-flexipatch-index-conflict/dmenu -ix
Press Enter OUTPUT: 0 dmenu-flexipatch-index-conflict is not working as expected, with ix optionI don't know if it is a bug but in the description of PRINTINDEX_PATCH there is no mention of an option or flag, so I am not sure if this is intended to be working this way
/* This patch allows dmenu to print out the 0-based index of matched text instead of the matched